@marigold/components 0.0.1 → 0.2.0

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.
Files changed (194) hide show
  1. package/dist/ActionGroup/ActionGroup.d.ts +9 -0
  2. package/dist/ActionGroup/index.d.ts +1 -0
  3. package/dist/Alert/Alert.d.ts +20 -2
  4. package/dist/Badge/Badge.d.ts +8 -0
  5. package/dist/Badge/index.d.ts +1 -0
  6. package/dist/Box/Box.d.ts +47 -0
  7. package/dist/Box/index.d.ts +1 -0
  8. package/dist/Button/Button.d.ts +4 -3
  9. package/dist/Card/Card.d.ts +9 -0
  10. package/dist/Card/index.d.ts +1 -0
  11. package/dist/Checkbox/Checkbox.d.ts +14 -2
  12. package/dist/Checkbox/CheckboxIcons.d.ts +9 -0
  13. package/dist/Column/Column.d.ts +8 -0
  14. package/dist/Column/index.d.ts +1 -0
  15. package/dist/Columns/Columns.d.ts +10 -0
  16. package/dist/Columns/index.d.ts +1 -0
  17. package/dist/Container/Container.d.ts +6 -0
  18. package/dist/Container/index.d.ts +1 -0
  19. package/dist/Dialog/Dialog.d.ts +14 -0
  20. package/dist/Dialog/ModalDialog.d.ts +5 -0
  21. package/dist/Dialog/index.d.ts +1 -0
  22. package/dist/Divider/Divider.d.ts +7 -0
  23. package/dist/Divider/index.d.ts +1 -0
  24. package/dist/Field/Field.d.ts +11 -0
  25. package/dist/Field/index.d.ts +1 -0
  26. package/dist/Heading/Heading.d.ts +7 -5
  27. package/dist/Hidden/Hidden.d.ts +5 -0
  28. package/dist/Hidden/index.d.ts +1 -0
  29. package/dist/Image/Image.d.ts +7 -0
  30. package/dist/Image/index.d.ts +1 -0
  31. package/dist/Input/Input.d.ts +6 -0
  32. package/dist/Input/index.d.ts +1 -0
  33. package/dist/Label/Label.d.ts +8 -5
  34. package/dist/Link/Link.d.ts +7 -3
  35. package/dist/Menu/Menu.d.ts +12 -0
  36. package/dist/Menu/index.d.ts +1 -0
  37. package/dist/MenuItem/MenuItem.d.ts +7 -0
  38. package/dist/MenuItem/index.d.ts +1 -0
  39. package/dist/Message/Message.d.ts +7 -0
  40. package/dist/Message/index.d.ts +1 -0
  41. package/dist/Provider/MarigoldProvider.d.ts +3 -0
  42. package/dist/Provider/index.d.ts +3 -0
  43. package/dist/Radio/Radio.d.ts +14 -2
  44. package/dist/Radio/RadioIcons.d.ts +9 -0
  45. package/dist/Select/ListBox.d.ts +8 -0
  46. package/dist/Select/ListBoxSection.d.ts +8 -0
  47. package/dist/Select/Option.d.ts +8 -0
  48. package/dist/Select/Popover.d.ts +9 -0
  49. package/dist/Select/Select.d.ts +13 -3
  50. package/dist/Slider/Slider.d.ts +6 -3
  51. package/dist/Stack/Stack.d.ts +7 -0
  52. package/dist/Stack/index.d.ts +1 -0
  53. package/dist/Text/Text.d.ts +12 -3
  54. package/dist/Textarea/Textarea.d.ts +11 -3
  55. package/dist/ValidationMessage/ValidationMessage.d.ts +6 -0
  56. package/dist/ValidationMessage/index.d.ts +1 -0
  57. package/dist/components.cjs.development.js +1308 -195
  58. package/dist/components.cjs.development.js.map +1 -1
  59. package/dist/components.cjs.production.min.js +1 -1
  60. package/dist/components.cjs.production.min.js.map +1 -1
  61. package/dist/components.esm.js +1267 -185
  62. package/dist/components.esm.js.map +1 -1
  63. package/dist/index.d.ts +21 -4
  64. package/dist/theme.d.ts +24 -4
  65. package/package.json +24 -4
  66. package/src/ActionGroup/ActionGroup.stories.mdx +62 -0
  67. package/src/ActionGroup/ActionGroup.test.tsx +83 -0
  68. package/src/ActionGroup/ActionGroup.tsx +43 -0
  69. package/src/ActionGroup/index.ts +1 -0
  70. package/src/Alert/Alert.stories.mdx +30 -42
  71. package/src/Alert/Alert.test.tsx +37 -22
  72. package/src/Alert/Alert.tsx +31 -21
  73. package/src/Badge/Badge.stories.mdx +57 -0
  74. package/src/Badge/Badge.test.tsx +61 -0
  75. package/src/Badge/Badge.tsx +25 -0
  76. package/src/Badge/index.ts +1 -0
  77. package/src/Box/Box.stories.mdx +334 -0
  78. package/src/Box/Box.test.tsx +133 -0
  79. package/src/Box/Box.tsx +165 -0
  80. package/src/Box/index.ts +1 -0
  81. package/src/Button/Button.stories.mdx +58 -134
  82. package/src/Button/Button.test.tsx +65 -23
  83. package/src/Button/Button.tsx +48 -14
  84. package/src/Card/Card.stories.mdx +49 -0
  85. package/src/Card/Card.test.tsx +66 -0
  86. package/src/Card/Card.tsx +36 -0
  87. package/src/Card/index.ts +1 -0
  88. package/src/Checkbox/Checkbox.stories.mdx +79 -101
  89. package/src/Checkbox/Checkbox.test.tsx +73 -32
  90. package/src/Checkbox/Checkbox.tsx +114 -35
  91. package/src/Checkbox/CheckboxIcons.tsx +49 -0
  92. package/src/Column/Column.stories.mdx +49 -0
  93. package/src/Column/Column.test.tsx +32 -0
  94. package/src/Column/Column.tsx +27 -0
  95. package/src/Column/index.ts +1 -0
  96. package/src/Columns/Columns.stories.mdx +65 -0
  97. package/src/Columns/Columns.test.tsx +102 -0
  98. package/src/Columns/Columns.tsx +69 -0
  99. package/src/Columns/index.ts +1 -0
  100. package/src/Container/Container.stories.mdx +19 -0
  101. package/src/Container/Container.test.tsx +26 -0
  102. package/src/Container/Container.tsx +13 -0
  103. package/src/Container/index.ts +1 -0
  104. package/src/Dialog/Dialog.stories.mdx +73 -0
  105. package/src/Dialog/Dialog.test.tsx +87 -0
  106. package/src/Dialog/Dialog.tsx +84 -0
  107. package/src/Dialog/ModalDialog.tsx +47 -0
  108. package/src/Dialog/index.ts +1 -0
  109. package/src/Divider/Divider.stories.mdx +37 -0
  110. package/src/Divider/Divider.test.tsx +63 -0
  111. package/src/Divider/Divider.tsx +13 -0
  112. package/src/Divider/index.ts +1 -0
  113. package/src/Field/Field.stories.mdx +97 -0
  114. package/src/Field/Field.test.tsx +80 -0
  115. package/src/Field/Field.tsx +54 -0
  116. package/src/Field/index.ts +1 -0
  117. package/src/Heading/Heading.stories.mdx +36 -76
  118. package/src/Heading/Heading.test.tsx +31 -17
  119. package/src/Heading/Heading.tsx +15 -12
  120. package/src/Hidden/Hidden.stories.mdx +39 -0
  121. package/src/Hidden/Hidden.test.tsx +24 -0
  122. package/src/Hidden/Hidden.tsx +16 -0
  123. package/src/Hidden/index.ts +1 -0
  124. package/src/Image/Image.stories.mdx +36 -0
  125. package/src/Image/Image.test.tsx +70 -0
  126. package/src/Image/Image.tsx +13 -0
  127. package/src/Image/index.ts +1 -0
  128. package/src/Input/Input.stories.mdx +61 -0
  129. package/src/Input/Input.test.tsx +70 -0
  130. package/src/Input/Input.tsx +13 -0
  131. package/src/Input/index.ts +1 -0
  132. package/src/Label/Label.stories.mdx +50 -34
  133. package/src/Label/Label.test.tsx +45 -16
  134. package/src/Label/Label.tsx +26 -17
  135. package/src/Link/Link.stories.mdx +40 -31
  136. package/src/Link/Link.test.tsx +53 -28
  137. package/src/Link/Link.tsx +32 -14
  138. package/src/Menu/Menu.stories.mdx +81 -0
  139. package/src/Menu/Menu.test.tsx +79 -0
  140. package/src/Menu/Menu.tsx +41 -0
  141. package/src/Menu/index.ts +1 -0
  142. package/src/MenuItem/MenuItem.stories.mdx +37 -0
  143. package/src/MenuItem/MenuItem.test.tsx +63 -0
  144. package/src/MenuItem/MenuItem.tsx +23 -0
  145. package/src/MenuItem/index.ts +1 -0
  146. package/src/Message/Message.stories.mdx +44 -0
  147. package/src/Message/Message.test.tsx +87 -0
  148. package/src/Message/Message.tsx +43 -0
  149. package/src/Message/index.ts +1 -0
  150. package/src/Provider/MarigoldProvider.test.tsx +126 -0
  151. package/src/Provider/MarigoldProvider.tsx +29 -0
  152. package/src/Provider/index.ts +3 -0
  153. package/src/Radio/Radio.stories.mdx +80 -83
  154. package/src/Radio/Radio.test.tsx +63 -22
  155. package/src/Radio/Radio.tsx +110 -35
  156. package/src/Radio/RadioIcons.tsx +39 -0
  157. package/src/Select/ListBox.tsx +39 -0
  158. package/src/Select/ListBoxSection.tsx +40 -0
  159. package/src/Select/Option.tsx +48 -0
  160. package/src/Select/Popover.tsx +50 -0
  161. package/src/Select/Select.stories.mdx +72 -37
  162. package/src/Select/Select.test.tsx +271 -28
  163. package/src/Select/Select.tsx +158 -23
  164. package/src/Slider/Slider.stories.mdx +26 -54
  165. package/src/Slider/Slider.test.tsx +13 -13
  166. package/src/Slider/Slider.tsx +20 -18
  167. package/src/Stack/Stack.stories.mdx +51 -0
  168. package/src/Stack/Stack.test.tsx +129 -0
  169. package/src/Stack/Stack.tsx +39 -0
  170. package/src/Stack/index.ts +1 -0
  171. package/src/Text/Text.stories.mdx +53 -47
  172. package/src/Text/Text.test.tsx +55 -15
  173. package/src/Text/Text.tsx +44 -10
  174. package/src/Textarea/Textarea.stories.mdx +68 -21
  175. package/src/Textarea/Textarea.test.tsx +47 -16
  176. package/src/Textarea/Textarea.tsx +46 -14
  177. package/src/ValidationMessage/ValidationMessage.stories.mdx +36 -0
  178. package/src/ValidationMessage/ValidationMessage.test.tsx +63 -0
  179. package/src/ValidationMessage/ValidationMessage.tsx +28 -0
  180. package/src/ValidationMessage/index.ts +1 -0
  181. package/src/index.ts +22 -4
  182. package/src/theme.ts +24 -4
  183. package/dist/Svg/Svg.d.ts +0 -5
  184. package/dist/Svg/index.d.ts +0 -1
  185. package/dist/TextInput/TextInput.d.ts +0 -3
  186. package/dist/TextInput/index.d.ts +0 -1
  187. package/src/Svg/Svg.stories.mdx +0 -47
  188. package/src/Svg/Svg.test.tsx +0 -58
  189. package/src/Svg/Svg.tsx +0 -25
  190. package/src/Svg/index.ts +0 -1
  191. package/src/TextInput/TextInput.stories.mdx +0 -37
  192. package/src/TextInput/TextInput.test.tsx +0 -71
  193. package/src/TextInput/TextInput.tsx +0 -21
  194. package/src/TextInput/index.ts +0 -1
@@ -1,64 +1,79 @@
1
1
  import React from 'react';
2
2
  import { render, screen } from '@testing-library/react';
3
- import { MarigoldProvider } from '@marigold/system';
4
- import { Alert } from '@marigold/components';
3
+ import { ThemeProvider } from '@marigold/system';
4
+ import { Alert } from './Alert';
5
5
 
6
6
  const theme = {
7
7
  alerts: {
8
- info: {
8
+ success: {
9
9
  alignItems: 'center',
10
10
  },
11
- danger: {
11
+ error: {
12
12
  alignItems: 'right',
13
13
  },
14
+ warning: {
15
+ alignItems: 'left',
16
+ },
14
17
  },
15
18
  };
16
19
 
17
20
  test('supports default variant and themeSection', () => {
18
21
  render(
19
- <MarigoldProvider theme={theme}>
22
+ <ThemeProvider theme={theme}>
20
23
  <Alert title="default">Default</Alert>
21
- </MarigoldProvider>
24
+ </ThemeProvider>
22
25
  );
23
26
  const alert = screen.getByTitle(/default/);
24
27
 
25
28
  expect(alert).toHaveStyle(`align-items: center`);
26
29
  });
27
30
 
28
- test('accepts other variant than default', () => {
31
+ test('accepts error variant', () => {
29
32
  render(
30
- <MarigoldProvider theme={theme}>
31
- <Alert title="danger" variant="danger">
32
- Danger
33
+ <ThemeProvider theme={theme}>
34
+ <Alert title="error" variant="error">
35
+ Error
33
36
  </Alert>
34
- </MarigoldProvider>
37
+ </ThemeProvider>
35
38
  );
36
- const alert = screen.getByTitle(/danger/);
39
+ const alert = screen.getByTitle(/error/);
37
40
 
38
41
  expect(alert).toHaveStyle(`align-items: right`);
39
42
  });
40
43
 
44
+ test('accepts warning variant', () => {
45
+ render(
46
+ <ThemeProvider theme={theme}>
47
+ <Alert title="warning" variant="warning">
48
+ warning
49
+ </Alert>
50
+ </ThemeProvider>
51
+ );
52
+ const alert = screen.getByTitle(/warning/);
53
+
54
+ expect(alert).toHaveStyle(`align-items: left`);
55
+ });
56
+
41
57
  test('renders correct HTML element', () => {
42
58
  render(
43
- <MarigoldProvider theme={theme}>
59
+ <ThemeProvider theme={theme}>
44
60
  <Alert title="default">Default</Alert>
45
- </MarigoldProvider>
61
+ </ThemeProvider>
46
62
  );
47
63
  const alert = screen.getByTitle(/default/);
48
64
 
49
65
  expect(alert instanceof HTMLDivElement).toBeTruthy();
50
66
  });
51
67
 
52
- test('variant styles cannot be overridden with CSS prop', () => {
68
+ test('accepts custom styles prop className', () => {
53
69
  render(
54
- <MarigoldProvider theme={theme}>
55
- <Alert title="default" css={{ alignItems: 'left' }}>
56
- Default
70
+ <ThemeProvider theme={theme}>
71
+ <Alert className="custom-class-name" title="alert">
72
+ alert
57
73
  </Alert>
58
- </MarigoldProvider>
74
+ </ThemeProvider>
59
75
  );
60
- const alert = screen.getByTitle(/default/);
76
+ const alert = screen.getByTitle(/alert/);
61
77
 
62
- expect(alert).toHaveStyle(`align-items: center`);
63
- expect(alert).not.toHaveStyle(`align-items: left`);
78
+ expect(alert.className).toMatch('custom-class-name');
64
79
  });
@@ -1,27 +1,37 @@
1
1
  import React from 'react';
2
- import { Box, system } from '@marigold/system';
2
+ import { ComponentProps } from '@marigold/types';
3
+ import { Exclamation, Check, Notification } from '@marigold/icons';
4
+ import { Box } from '../Box';
3
5
 
4
- type AlertProps = {};
6
+ const ICON_MAP = {
7
+ success: Check,
8
+ warning: Notification,
9
+ error: Exclamation,
10
+ } as const;
5
11
 
6
- export const Alert = system<AlertProps, 'div'>(
7
- ({ variant = 'info', ref, children, ...props }) => {
8
- return (
12
+ export type AlertProps = {
13
+ variant?: keyof typeof ICON_MAP;
14
+ } & ComponentProps<'div'>;
15
+
16
+ export const Alert: React.FC<AlertProps> = ({
17
+ variant = 'success',
18
+ children,
19
+ ...props
20
+ }) => {
21
+ const Icon = ICON_MAP[variant];
22
+
23
+ return (
24
+ <Box {...props} display="flex" variant={`alerts.${variant}`}>
9
25
  <Box
10
- as="div"
11
- ref={ref}
12
- themeSection="alerts"
13
- variant={variant}
14
- {...props}
15
- css={{
16
- display: 'flex',
17
- alignItems: 'center',
18
- px: 3,
19
- py: 2,
20
- borderRadius: 4,
21
- }}
26
+ display="inline-block"
27
+ alignItems="center"
28
+ width="32px"
29
+ height="32px"
30
+ bg={variant}
22
31
  >
23
- {children}
32
+ <Box as={Icon} size={12} color="#fff" bg={variant} m={10} />
24
33
  </Box>
25
- );
26
- }
27
- );
34
+ <Box mx="16px">{children}</Box>
35
+ </Box>
36
+ );
37
+ };
@@ -0,0 +1,57 @@
1
+ import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs';
2
+ import { Badge } from './Badge';
3
+ import { Check } from '@marigold/icons';
4
+
5
+ <Meta
6
+ title="Components/Badge"
7
+ argTypes={{
8
+ variant: {
9
+ control: {
10
+ type: 'select',
11
+ },
12
+ options: ['default'],
13
+ description: 'Badge style',
14
+ table: {
15
+ defaultValue: {
16
+ summary: 'default',
17
+ },
18
+ },
19
+ },
20
+ bgColor: {
21
+ control: {
22
+ type: 'text',
23
+ },
24
+ description: 'background',
25
+ table: {
26
+ defaultValue: {
27
+ summary: 'inherit',
28
+ },
29
+ },
30
+ },
31
+ borderColor: {
32
+ control: {
33
+ type: 'text',
34
+ },
35
+ description: 'Outline color',
36
+ table: {
37
+ defaultValue: {
38
+ summary: 'transparent',
39
+ },
40
+ },
41
+ },
42
+ }}
43
+ />
44
+
45
+ # Badge
46
+
47
+ export const Template = args => (
48
+ <Badge {...args}>
49
+ <Check /> Check
50
+ </Badge>
51
+ );
52
+
53
+ <Canvas>
54
+ <Story name="Default">{Template.bind({})}</Story>
55
+ </Canvas>
56
+
57
+ <ArgsTable story="Default" />
@@ -0,0 +1,61 @@
1
+ import React from 'react';
2
+ import { render, screen } from '@testing-library/react';
3
+ import { ThemeProvider } from '@marigold/system';
4
+ import { Badge } from './Badge';
5
+
6
+ const theme = {
7
+ badge: {
8
+ default: {
9
+ borderRadius: '8px',
10
+ },
11
+ fatBadge: {
12
+ borderRadius: '12px',
13
+ },
14
+ },
15
+ };
16
+
17
+ test('supports default variant and themeSection', () => {
18
+ render(
19
+ <ThemeProvider theme={theme}>
20
+ <Badge title="badge" />
21
+ </ThemeProvider>
22
+ );
23
+ const badge = screen.getByTitle(/badge/);
24
+
25
+ expect(badge).toHaveStyle(`border-radius: 8px;`);
26
+ });
27
+
28
+ test('renders correct HTML element', () => {
29
+ render(
30
+ <ThemeProvider theme={theme}>
31
+ <Badge title="badge" />
32
+ </ThemeProvider>
33
+ );
34
+ const badge = screen.getByTitle(/badge/);
35
+
36
+ expect(badge instanceof HTMLDivElement).toBeTruthy();
37
+ });
38
+
39
+ test('supports other variant than default', () => {
40
+ render(
41
+ <ThemeProvider theme={theme}>
42
+ <Badge variant="fatBadge" title="badge" />
43
+ </ThemeProvider>
44
+ );
45
+ const badge = screen.getByTitle(/badge/);
46
+
47
+ expect(badge).toHaveStyle(`border-radius: 12px;`);
48
+ });
49
+
50
+ test('accepts custom styles prop className', () => {
51
+ render(
52
+ <ThemeProvider theme={theme}>
53
+ <Badge className="custom-class-name" title="badge">
54
+ badge
55
+ </Badge>
56
+ </ThemeProvider>
57
+ );
58
+ const badge = screen.getByTitle(/badge/);
59
+
60
+ expect(badge.className).toMatch('custom-class-name');
61
+ });
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { ComponentProps } from '@marigold/types';
3
+ import { Box } from '../Box';
4
+
5
+ export type BadgeProps = {
6
+ variant?: string;
7
+ bgColor?: string;
8
+ borderColor?: string;
9
+ } & ComponentProps<'div'>;
10
+
11
+ export const Badge: React.FC<BadgeProps> = ({
12
+ variant = 'default',
13
+ bgColor = 'transparent',
14
+ borderColor = 'transparent',
15
+ children,
16
+ ...props
17
+ }) => (
18
+ <Box
19
+ css={{ bg: bgColor, borderColor: borderColor }}
20
+ variant={`badge.${variant}`}
21
+ {...props}
22
+ >
23
+ {children}
24
+ </Box>
25
+ );
@@ -0,0 +1 @@
1
+ export * from './Badge';
@@ -0,0 +1,334 @@
1
+ import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs';
2
+ import { Box } from './Box';
3
+ import { Button } from '../Button';
4
+ import { Label } from '../Label';
5
+
6
+ <Meta
7
+ title="Components/Box"
8
+ argTypes={{
9
+ variant: {
10
+ control: {
11
+ type: 'text',
12
+ },
13
+ table: {
14
+ category: 'General',
15
+ },
16
+ },
17
+ display: {
18
+ control: {
19
+ type: 'text',
20
+ },
21
+ table: {
22
+ category: 'General',
23
+ },
24
+ },
25
+ height: {
26
+ control: {
27
+ type: 'text',
28
+ },
29
+ table: {
30
+ category: 'Width',
31
+ },
32
+ },
33
+ width: {
34
+ control: {
35
+ type: 'text',
36
+ },
37
+ table: {
38
+ category: 'Width',
39
+ },
40
+ },
41
+ minWidth: {
42
+ control: {
43
+ type: 'text',
44
+ },
45
+ table: {
46
+ category: 'Width',
47
+ },
48
+ },
49
+ maxWidth: {
50
+ control: {
51
+ type: 'text',
52
+ },
53
+ table: {
54
+ category: 'Width',
55
+ },
56
+ },
57
+ position: {
58
+ control: {
59
+ type: 'text',
60
+ },
61
+ table: {
62
+ category: 'Position',
63
+ },
64
+ },
65
+ top: {
66
+ control: {
67
+ type: 'text',
68
+ },
69
+ table: {
70
+ category: 'Position',
71
+ },
72
+ },
73
+ bottom: {
74
+ control: {
75
+ type: 'text',
76
+ },
77
+ table: {
78
+ category: 'Position',
79
+ },
80
+ },
81
+ right: {
82
+ control: {
83
+ type: 'text',
84
+ },
85
+ table: {
86
+ category: 'Position',
87
+ },
88
+ },
89
+ left: {
90
+ control: {
91
+ type: 'text',
92
+ },
93
+ table: {
94
+ category: 'Position',
95
+ },
96
+ },
97
+ zIndex: {
98
+ control: {
99
+ type: 'text',
100
+ },
101
+ table: {
102
+ category: 'Position',
103
+ },
104
+ },
105
+ p: {
106
+ control: {
107
+ type: 'text',
108
+ },
109
+ table: {
110
+ category: 'Padding',
111
+ },
112
+ },
113
+ px: {
114
+ control: {
115
+ type: 'text',
116
+ },
117
+ table: {
118
+ category: 'Padding',
119
+ },
120
+ },
121
+ py: {
122
+ control: {
123
+ type: 'text',
124
+ },
125
+ table: {
126
+ category: 'Padding',
127
+ },
128
+ },
129
+ pt: {
130
+ control: {
131
+ type: 'text',
132
+ },
133
+ table: {
134
+ category: 'Padding',
135
+ },
136
+ },
137
+ pb: {
138
+ control: {
139
+ type: 'text',
140
+ },
141
+ table: {
142
+ category: 'Padding',
143
+ },
144
+ },
145
+ pl: {
146
+ control: {
147
+ type: 'text',
148
+ },
149
+ table: {
150
+ category: 'Padding',
151
+ },
152
+ },
153
+ pr: {
154
+ control: {
155
+ type: 'text',
156
+ },
157
+ table: {
158
+ category: 'Padding',
159
+ },
160
+ },
161
+ m: {
162
+ control: {
163
+ type: 'text',
164
+ },
165
+ table: {
166
+ category: 'Margin',
167
+ },
168
+ },
169
+ mx: {
170
+ control: {
171
+ type: 'text',
172
+ },
173
+ table: {
174
+ category: 'Margin',
175
+ },
176
+ },
177
+ my: {
178
+ control: {
179
+ type: 'text',
180
+ },
181
+ table: {
182
+ category: 'Margin',
183
+ },
184
+ },
185
+ mt: {
186
+ control: {
187
+ type: 'text',
188
+ },
189
+ table: {
190
+ category: 'Margin',
191
+ },
192
+ },
193
+ mb: {
194
+ control: {
195
+ type: 'text',
196
+ },
197
+ table: {
198
+ category: 'Margin',
199
+ },
200
+ },
201
+ ml: {
202
+ control: {
203
+ type: 'text',
204
+ },
205
+ table: {
206
+ category: 'Margin',
207
+ },
208
+ },
209
+ mr: {
210
+ control: {
211
+ type: 'text',
212
+ },
213
+ table: {
214
+ category: 'Margin',
215
+ },
216
+ },
217
+ flexDirection: {
218
+ control: {
219
+ type: 'text',
220
+ },
221
+ table: {
222
+ category: 'Flex',
223
+ },
224
+ },
225
+ flexWrap: {
226
+ control: {
227
+ type: 'text',
228
+ },
229
+ table: {
230
+ category: 'Flex',
231
+ },
232
+ },
233
+ flexShrink: {
234
+ control: {
235
+ type: 'text',
236
+ },
237
+ table: {
238
+ category: 'Flex',
239
+ },
240
+ },
241
+ flexGrow: {
242
+ control: {
243
+ type: 'text',
244
+ },
245
+ table: {
246
+ category: 'Flex',
247
+ },
248
+ },
249
+ alignItems: {
250
+ control: {
251
+ type: 'text',
252
+ },
253
+ table: {
254
+ category: 'Flex',
255
+ },
256
+ },
257
+ justifyContent: {
258
+ control: {
259
+ type: 'text',
260
+ },
261
+ table: {
262
+ category: 'Flex',
263
+ },
264
+ },
265
+ bg: {
266
+ control: {
267
+ type: 'text',
268
+ },
269
+ table: {
270
+ category: 'Other',
271
+ },
272
+ },
273
+ border: {
274
+ control: {
275
+ type: 'text',
276
+ },
277
+ table: {
278
+ category: 'Other',
279
+ },
280
+ },
281
+ borderRadius: {
282
+ control: {
283
+ type: 'text',
284
+ },
285
+ table: {
286
+ category: 'Other',
287
+ },
288
+ },
289
+ boxShadow: {
290
+ control: {
291
+ type: 'text',
292
+ },
293
+ table: {
294
+ category: 'Other',
295
+ },
296
+ },
297
+ opacity: {
298
+ control: {
299
+ type: 'text',
300
+ },
301
+ table: {
302
+ category: 'Other',
303
+ },
304
+ },
305
+ overflow: {
306
+ control: {
307
+ type: 'text',
308
+ },
309
+ table: {
310
+ category: 'Other',
311
+ },
312
+ },
313
+ transition: {
314
+ control: {
315
+ type: 'text',
316
+ },
317
+ table: {
318
+ category: 'Other',
319
+ },
320
+ },
321
+ }}
322
+ />
323
+
324
+ # Box-Component
325
+
326
+ ## For custom components
327
+
328
+ export const Template = args => <Box {...args}>Style me!</Box>;
329
+
330
+ <Canvas>
331
+ <Story name="Default">{Template.bind({})}</Story>
332
+ </Canvas>
333
+
334
+ <ArgsTable story="Default" />