@integrigo/integrigo-ui 1.6.16-a → 1.6.16-b
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,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { MouseEvent, FC } from 'react';
|
2
2
|
import styled from 'styled-components';
|
3
3
|
import { Icon, IconType } from '../Icon';
|
4
4
|
|
@@ -18,6 +18,7 @@ export enum ChipVariant {
|
|
18
18
|
white = 'white',
|
19
19
|
primary = 'primary',
|
20
20
|
secondary = 'secondary',
|
21
|
+
grey = 'grey'
|
21
22
|
}
|
22
23
|
|
23
24
|
export enum ChipSize {
|
@@ -91,6 +92,9 @@ const colorVariant = {
|
|
91
92
|
white: {
|
92
93
|
fontColor: 'var(--shades-of-grey-100);',
|
93
94
|
},
|
95
|
+
grey: {
|
96
|
+
fontColor: 'var(--shades-of-grey-100)',
|
97
|
+
}
|
94
98
|
};
|
95
99
|
|
96
100
|
export const Chip: FC<ChipProps> = (props: ChipProps) => {
|
@@ -151,6 +155,20 @@ const getVariantStyles = (variant: ChipVariant, clickable: boolean): string => {
|
|
151
155
|
background-color: var(--shades-of-grey-40);
|
152
156
|
}
|
153
157
|
|
158
|
+
&:active {
|
159
|
+
background-color: var(--shades-of-grey-60);
|
160
|
+
}
|
161
|
+
`}
|
162
|
+
`;
|
163
|
+
case ChipVariant.grey:
|
164
|
+
return `
|
165
|
+
background-color: var(--shades-of-grey-40);
|
166
|
+
|
167
|
+
${clickable && `
|
168
|
+
&:hover {
|
169
|
+
background-color: var(--shades-of-grey-60);
|
170
|
+
}
|
171
|
+
|
154
172
|
&:active {
|
155
173
|
background-color: var(--shades-of-grey-60);
|
156
174
|
}
|