hds-web 1.3.5 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hds-web",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -7,7 +7,7 @@ export default function HasConAvatar({ name, designation, size, imageUrl }) {
7
7
  return (
8
8
  <div className={`tb:max-w-[289px] group rounded-3xl flex items-center justify-between bg-neutral-0 tb:inline-flex tb:flex-col shadow tb:min-w-[18rem]`}>
9
9
 
10
- <div className="px-5 py-[30px] tb:p-0 text-left tb:flex-col min-h-[96px] tb:flex tb:items-center tb:px-8 tb:pb-8 tb:mt-8 tb:ml-0 tb-l:text-center">
10
+ <div className="px-5 py-[30px] tb:p-0 text-left tb:flex-col min-h-[96px] tb:flex tb:items-center tb:px-8 tb:pb-8 tb:mt-8 tb:ml-0 tb:text-center">
11
11
  <Typography textStyle='h5' className='text-blue-400'>{name}</Typography>
12
12
  <Typography textStyle='h7' className='text-blue-800 uppercase'>{designation}</Typography>
13
13
  </div>
@@ -43,13 +43,15 @@ export default function CarouselCard(props) {
43
43
  const totalCards = props.cards.length;
44
44
 
45
45
  const nextCard = () => {
46
- if (currentCard >= totalCards-3) {
47
- scrollToCard(0);
46
+ const scrollByAmount = window.innerWidth > 900 ? 3 : 1;
47
+
48
+ if (currentCard >= totalCards - scrollByAmount) {
49
+ scrollToCard(0);
48
50
  } else {
49
- scrollToCard(currentCard + 1);
51
+ scrollToCard(currentCard + scrollByAmount);
50
52
  }
51
- };
52
-
53
+ };
54
+
53
55
  const previousCard = () => {
54
56
  if (currentCard === 0) {
55
57
  scrollToCard(totalCards - 1);