oddsgate-ds 1.0.31 → 1.0.32

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.
@@ -1,4 +1,4 @@
1
1
  import { IChip } from './Chip.interface';
2
2
  import React from 'react';
3
- declare const Chip: ({ variant, hover, className, style, children, ...props }: IChip) => React.JSX.Element;
3
+ declare const Chip: ({ variant, hover, active, className, style, children, onClick, ...props }: IChip) => React.JSX.Element;
4
4
  export default Chip;
@@ -3,7 +3,11 @@ export interface IChip {
3
3
  variant?: string;
4
4
  $variant?: string;
5
5
  hover?: boolean;
6
+ $hover?: boolean;
7
+ $active?: boolean;
8
+ active?: boolean;
6
9
  className?: string;
7
10
  style?: CSSProperties;
8
11
  children?: React.ReactNode;
12
+ onClick?: (event?: React.MouseEvent<HTMLElement>) => void;
9
13
  }
package/dist/types.d.ts CHANGED
@@ -204,12 +204,16 @@ interface IChip {
204
204
  variant?: string;
205
205
  $variant?: string;
206
206
  hover?: boolean;
207
+ $hover?: boolean;
208
+ $active?: boolean;
209
+ active?: boolean;
207
210
  className?: string;
208
211
  style?: CSSProperties;
209
212
  children?: React.ReactNode;
213
+ onClick?: (event?: React.MouseEvent<HTMLElement>) => void;
210
214
  }
211
215
 
212
- declare const Chip: ({ variant, hover, className, style, children, ...props }: IChip) => React__default.JSX.Element;
216
+ declare const Chip: ({ variant, hover, active, className, style, children, onClick, ...props }: IChip) => React__default.JSX.Element;
213
217
 
214
218
  type IQuote = {
215
219
  id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -39,10 +39,18 @@ const Button = ({
39
39
  className={className}
40
40
  {...props}
41
41
  >
42
- {/* {leftIcon} */}
43
- {children && <span>{children}</span>}
44
- <Icon icon={"icon-arrow-right"} />
45
- {/* {rightIcon} */}
42
+ {variant === "primary" ? (
43
+ <>
44
+ {children && <span>{children}</span>}
45
+ <Icon icon={"icon-arrow-right"} />
46
+ </>
47
+ ) : (
48
+ <>
49
+ {leftIcon}
50
+ {children && <span>{children}</span>}
51
+ {rightIcon}
52
+ </>
53
+ )}
46
54
  </StyledButton>
47
55
  )
48
56
  }
@@ -6,17 +6,21 @@ import cn from 'classnames'
6
6
  const Chip = ({
7
7
  variant,
8
8
  hover,
9
+ active,
9
10
  className,
10
11
  style,
11
12
  children,
13
+ onClick,
12
14
  ...props
13
15
  }: IChip) => {
14
16
  return (
15
17
  <StyledChip
16
18
  $variant={variant}
17
- hover={hover}
19
+ $hover={hover}
20
+ $active={active}
18
21
  className={cn('captions', className)}
19
22
  style={style}
23
+ onClick={onClick}
20
24
  >
21
25
  {children}
22
26
  </StyledChip>
@@ -4,7 +4,11 @@ export interface IChip {
4
4
  variant?: string;
5
5
  $variant?: string;
6
6
  hover?: boolean,
7
+ $hover?: boolean,
8
+ $active?: boolean,
9
+ active?: boolean,
7
10
  className?: string,
8
11
  style?: CSSProperties
9
12
  children?: React.ReactNode
13
+ onClick?: (event?: React.MouseEvent<HTMLElement>) => void
10
14
  }
@@ -15,10 +15,10 @@ export const StyledChip = styled.div<IChip>`
15
15
  switch (props.$variant) {
16
16
  case "dark": default:
17
17
  return css`
18
- color: ${colors.white};
18
+ color: ${props.$active ? colors.white : colors.black};
19
19
  border: 1px solid ${colors.white};
20
20
 
21
- ${props.hover && `
21
+ ${props.$hover && !props.$active && `
22
22
  &:hover{
23
23
  color: ${colors.black};
24
24
  background-color: ${colors.white};
@@ -30,7 +30,7 @@ export const StyledChip = styled.div<IChip>`
30
30
  color: ${colors.black};
31
31
  border: 1px solid ${colors.black};
32
32
 
33
- ${props.hover && `
33
+ ${props.$hover && !props.$active && `
34
34
  &:hover{
35
35
  color: ${colors.white};
36
36
  background-color: ${colors.black};
@@ -40,7 +40,7 @@ export const StyledChip = styled.div<IChip>`
40
40
  }
41
41
  }}
42
42
 
43
- ${({ hover }) => hover && `
43
+ ${({ $hover }) => $hover && `
44
44
  transition: all 0.3s linear;
45
45
  cursor:pointer;
46
46
  `}
@@ -47,7 +47,7 @@ export const StyledTabsContent = styled.div<ITabsItem>`
47
47
  border-radius: 48px 0;
48
48
  padding: 36px;
49
49
 
50
- min-height: 50rem;
50
+ min-height: 40rem;
51
51
 
52
52
  opacity: 0;
53
53
  transform: translateY(40px);