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.
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/Chip/Chip.component.d.ts +1 -1
- package/dist/cjs/types/components/atoms/Chip/Chip.interface.d.ts +4 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/Chip/Chip.component.d.ts +1 -1
- package/dist/esm/types/components/atoms/Chip/Chip.interface.d.ts +4 -0
- package/dist/types.d.ts +5 -1
- package/package.json +1 -1
- package/src/components/atoms/Button/Button.component.tsx +12 -4
- package/src/components/atoms/Chip/Chip.component.tsx +5 -1
- package/src/components/atoms/Chip/Chip.interface.ts +4 -0
- package/src/components/atoms/Chip/Chip.theme.ts +4 -4
- package/src/components/organisms/Tabs/Tabs.theme.ts +1 -1
|
@@ -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
|
@@ -39,10 +39,18 @@ const Button = ({
|
|
|
39
39
|
className={className}
|
|
40
40
|
{...props}
|
|
41
41
|
>
|
|
42
|
-
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|
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
|
|
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
|
`}
|