@spothero/ui 15.9.5-beta.0 → 15.9.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 +1 -1
- package/styles/v2/components/Badge/Badge.jsx +1 -0
- package/styles/v2/components/Badge/Badge.stories.js +32 -0
- package/styles/v2/components/Badge/styles/index.js +29 -0
- package/styles/v2/components/index.js +1 -0
- package/styles/v2/components/styles.js +2 -1
- package/v2/index.js +1 -1
- package/v2/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {Badge as default} from '@chakra-ui/react';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Component from './Badge';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'v2/Badge',
|
|
6
|
+
component: Component,
|
|
7
|
+
parameters: {
|
|
8
|
+
removeBaseHtmlClass: true,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const Template = props => (
|
|
13
|
+
<>
|
|
14
|
+
<Component variant='primary'>
|
|
15
|
+
Primary
|
|
16
|
+
</Component>
|
|
17
|
+
<br/>
|
|
18
|
+
<Component variant='warningLight'>
|
|
19
|
+
Warning Light
|
|
20
|
+
</Component>
|
|
21
|
+
<br/>
|
|
22
|
+
<Component variant='solid' colorScheme='green'>
|
|
23
|
+
Success
|
|
24
|
+
</Component>
|
|
25
|
+
<br/>
|
|
26
|
+
<Component variant='subtle' colorScheme='red'>
|
|
27
|
+
Removed
|
|
28
|
+
</Component>
|
|
29
|
+
</>
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export const Badge = Template.bind({});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import merge from 'lodash/merge';
|
|
2
|
+
import chakraDefaultTheme from '@chakra-ui/theme';
|
|
3
|
+
|
|
4
|
+
const baseStyle = {
|
|
5
|
+
px: 1,
|
|
6
|
+
textTransform: 'reset',
|
|
7
|
+
fontSize: 'xs',
|
|
8
|
+
borderRadius: 'sm',
|
|
9
|
+
fontWeight: 'bold',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const variants = {
|
|
13
|
+
primary: {
|
|
14
|
+
bg: 'primary.default',
|
|
15
|
+
color: 'white',
|
|
16
|
+
},
|
|
17
|
+
warningLight: {
|
|
18
|
+
bg: 'yellow.100',
|
|
19
|
+
color: 'black',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const defaultProps = {};
|
|
24
|
+
|
|
25
|
+
export default merge(chakraDefaultTheme.components.Badge, {
|
|
26
|
+
variants,
|
|
27
|
+
baseStyle,
|
|
28
|
+
defaultProps,
|
|
29
|
+
});
|
|
@@ -16,4 +16,5 @@ export {default as Popover} from './Popover/styles';
|
|
|
16
16
|
export {default as Input} from './Input/styles';
|
|
17
17
|
export {default as Modal} from './Modal/styles';
|
|
18
18
|
export {default as Radio} from './Radio/styles';
|
|
19
|
-
export {default as Skeleton} from './Skeleton/Skeleton.styles';
|
|
19
|
+
export {default as Skeleton} from './Skeleton/Skeleton.styles';
|
|
20
|
+
export {default as Badge} from './Badge/styles';
|