@qoretechnologies/reqore 0.29.1 → 0.29.3

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 (79) hide show
  1. package/__tests__/multiselect.test.tsx +59 -75
  2. package/dist/components/Button/index.d.ts.map +1 -1
  3. package/dist/components/Button/index.js +3 -1
  4. package/dist/components/Button/index.js.map +1 -1
  5. package/dist/components/Checkbox/index.d.ts +2 -0
  6. package/dist/components/Checkbox/index.d.ts.map +1 -1
  7. package/dist/components/Checkbox/index.js +16 -20
  8. package/dist/components/Checkbox/index.js.map +1 -1
  9. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  10. package/dist/components/ControlGroup/index.js +6 -4
  11. package/dist/components/ControlGroup/index.js.map +1 -1
  12. package/dist/components/Effect/index.d.ts +7 -3
  13. package/dist/components/Effect/index.d.ts.map +1 -1
  14. package/dist/components/Effect/index.js +41 -32
  15. package/dist/components/Effect/index.js.map +1 -1
  16. package/dist/components/Menu/divider.d.ts +1 -1
  17. package/dist/components/Menu/divider.d.ts.map +1 -1
  18. package/dist/components/MultiSelect/index.d.ts +1 -1
  19. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  20. package/dist/components/MultiSelect/index.js +17 -19
  21. package/dist/components/MultiSelect/index.js.map +1 -1
  22. package/dist/components/Panel/index.d.ts.map +1 -1
  23. package/dist/components/Panel/index.js.map +1 -1
  24. package/dist/components/RadioGroup/index.d.ts +2 -1
  25. package/dist/components/RadioGroup/index.d.ts.map +1 -1
  26. package/dist/components/RadioGroup/index.js +2 -2
  27. package/dist/components/RadioGroup/index.js.map +1 -1
  28. package/dist/components/Spacer/index.d.ts +15 -1
  29. package/dist/components/Spacer/index.d.ts.map +1 -1
  30. package/dist/components/Spacer/index.js +87 -10
  31. package/dist/components/Spacer/index.js.map +1 -1
  32. package/dist/constants/sizes.d.ts +8 -0
  33. package/dist/constants/sizes.d.ts.map +1 -1
  34. package/dist/constants/sizes.js +9 -1
  35. package/dist/constants/sizes.js.map +1 -1
  36. package/dist/constants/theme.d.ts +4 -1
  37. package/dist/constants/theme.d.ts.map +1 -1
  38. package/dist/constants/theme.js.map +1 -1
  39. package/dist/helpers/colors.d.ts +5 -4
  40. package/dist/helpers/colors.d.ts.map +1 -1
  41. package/dist/helpers/colors.js +35 -8
  42. package/dist/helpers/colors.js.map +1 -1
  43. package/dist/hooks/useReqoreEffect.d.ts +4 -0
  44. package/dist/hooks/useReqoreEffect.d.ts.map +1 -0
  45. package/dist/hooks/useReqoreEffect.js +42 -0
  46. package/dist/hooks/useReqoreEffect.js.map +1 -0
  47. package/dist/hooks/useTheme.d.ts +1 -0
  48. package/dist/hooks/useTheme.d.ts.map +1 -1
  49. package/dist/hooks/useTheme.js.map +1 -1
  50. package/dist/index.d.ts +3 -1
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +8 -2
  53. package/dist/index.js.map +1 -1
  54. package/package.json +1 -1
  55. package/src/components/Button/index.tsx +4 -2
  56. package/src/components/Checkbox/index.tsx +42 -18
  57. package/src/components/ControlGroup/index.tsx +26 -24
  58. package/src/components/Effect/index.tsx +60 -10
  59. package/src/components/Menu/divider.tsx +1 -1
  60. package/src/components/MultiSelect/index.tsx +21 -23
  61. package/src/components/Panel/index.tsx +3 -3
  62. package/src/components/RadioGroup/index.tsx +4 -2
  63. package/src/components/Spacer/index.tsx +90 -5
  64. package/src/constants/sizes.ts +9 -0
  65. package/src/constants/theme.ts +8 -1
  66. package/src/helpers/colors.ts +54 -11
  67. package/src/hooks/useReqoreEffect.ts +49 -0
  68. package/src/hooks/useTheme.ts +2 -1
  69. package/src/index.tsx +3 -1
  70. package/src/mock/multiSelect.ts +1 -1
  71. package/src/stories/Button/Button.stories.tsx +14 -0
  72. package/src/stories/Checkbox/Checkbox.stories.tsx +1 -1
  73. package/src/stories/ControlGroup/ControlGroup.stories.tsx +18 -3
  74. package/src/stories/MultiSelect/MultiSelect.stories.tsx +4 -1
  75. package/src/stories/Panel/Panel.stories.tsx +1 -1
  76. package/src/stories/Popover/Popover.stories.tsx +1 -1
  77. package/src/stories/RadioGroup/RadioGroup.stories.tsx +47 -0
  78. package/src/stories/Spacer/Spacer.stories.tsx +93 -0
  79. package/tests.json +1 -1
@@ -1,4 +1,8 @@
1
- import { TReqoreEffectColor, TReqoreHexColor } from '../components/Effect';
1
+ import {
2
+ TReqoreEffectColor,
3
+ TReqoreEffectGradientAnimationTrigger,
4
+ TReqoreHexColor,
5
+ } from '../components/Effect';
2
6
 
3
7
  export interface IReqoreSidebarTheme {
4
8
  main?: TReqoreHexColor;
@@ -65,6 +69,7 @@ export interface IReqoreTheme {
65
69
  header?: IReqoreNavbarTheme;
66
70
  footer?: IReqoreNavbarTheme;
67
71
  breadcrumbs?: IReqoreBreadcrumbsTheme;
72
+ buttons?: IReqoreCustomTheme;
68
73
  }
69
74
 
70
75
  export interface IReqoreCustomTheme {
@@ -73,6 +78,8 @@ export interface IReqoreCustomTheme {
73
78
  color?: TReqoreEffectColor;
74
79
  dim?: boolean;
75
80
  };
81
+ gradient?: boolean;
82
+ animate?: TReqoreEffectGradientAnimationTrigger;
76
83
  }
77
84
 
78
85
  export interface IReqoreIntents {
@@ -1,6 +1,12 @@
1
1
  import { cloneDeep, merge, reduce } from 'lodash';
2
2
  import { darken, getLuminance, lighten, mix, readableColor } from 'polished';
3
- import { TReqoreEffectColor, TReqoreEffectColorList, TReqoreHexColor } from '../components/Effect';
3
+ import {
4
+ TReqoreEffectColor,
5
+ TReqoreEffectColorList,
6
+ TReqoreEffectGradientColors,
7
+ TReqoreEffectGradientColorsObject,
8
+ TReqoreHexColor,
9
+ } from '../components/Effect';
4
10
  import { Colors } from '../constants/colors';
5
11
  import { DEFAULT_INTENTS, IReqoreTheme, TReqoreIntent } from '../constants/theme';
6
12
 
@@ -175,7 +181,7 @@ export const getColorFromMaybeString = (
175
181
  _color = theme.intents[providedColor];
176
182
  }
177
183
 
178
- if (isValidSixCharHex(color)) {
184
+ if (isValidSixCharHex(providedColor)) {
179
185
  _color = providedColor as TReqoreHexColor;
180
186
  }
181
187
 
@@ -192,28 +198,62 @@ export const getColorFromMaybeString = (
192
198
 
193
199
  export const createEffectGradient = (
194
200
  theme: IReqoreTheme,
195
- colors: Record<number, TReqoreEffectColor>,
201
+ colors: TReqoreEffectGradientColors,
196
202
  lighten: number = 0,
197
203
  minimal?: boolean
198
204
  ): string => {
205
+ let _colors: TReqoreEffectGradientColorsObject;
206
+ // Check if the colors are valid
207
+ if (!colors) {
208
+ throw new Error('You need to provide colors');
209
+ }
210
+
211
+ if (typeof colors === 'string') {
212
+ _colors = buildGradientColorsFromString(theme, colors);
213
+ } else {
214
+ _colors = colors;
215
+ }
216
+
199
217
  return reduce(
200
- colors,
218
+ _colors,
201
219
  (colorsString, color, percentage) => {
202
220
  return `${colorsString}, ${
203
- minimal ? theme.main : changeLightness(getColorFromMaybeString(theme, color), lighten)
221
+ minimal
222
+ ? theme.originalMain
223
+ : changeLightness(getColorFromMaybeString(theme, color), lighten)
204
224
  } ${percentage}%`;
205
225
  },
206
226
  ''
207
227
  );
208
228
  };
209
229
 
230
+ export const buildGradientColorsFromString = (
231
+ theme: IReqoreTheme,
232
+ color: 'main' | TReqoreHexColor | TReqoreIntent
233
+ ): TReqoreEffectGradientColorsObject => {
234
+ if (!color) {
235
+ throw new Error('You need to provide a color or intent');
236
+ }
237
+
238
+ const colorFrom: TReqoreHexColor = getColorFromMaybeString(theme, `${color}:lighten:1`);
239
+ const colorTo: TReqoreHexColor = getColorFromMaybeString(theme, `${color}`);
240
+
241
+ return {
242
+ 0: colorFrom,
243
+ 100: colorTo,
244
+ };
245
+ };
246
+
210
247
  export const getNthGradientColor = (
211
248
  theme: IReqoreTheme,
212
- colors?: Record<number, TReqoreEffectColor>,
249
+ colors?: TReqoreEffectGradientColors,
213
250
  nth: number = 1
214
251
  ): TReqoreHexColor | undefined => {
215
- if (colors) {
216
- return getColorFromMaybeString(theme, Object.values(colors)[nth - 1]);
252
+ const _colors =
253
+ typeof colors === 'string' ? buildGradientColorsFromString(theme, colors) : colors;
254
+
255
+ if (_colors) {
256
+ return getColorFromMaybeString(theme, Object.values(_colors)[nth - 1]);
217
257
  }
218
258
 
219
259
  return undefined;
@@ -221,12 +261,15 @@ export const getNthGradientColor = (
221
261
 
222
262
  export const getGradientMix = (
223
263
  theme: IReqoreTheme,
224
- colors: Record<number, TReqoreEffectColor>,
264
+ colors: TReqoreEffectGradientColors,
225
265
  fallback?: TReqoreHexColor
226
266
  ): TReqoreHexColor | undefined => {
267
+ const _colors =
268
+ typeof colors === 'string' ? buildGradientColorsFromString(theme, colors) : colors;
269
+
227
270
  if (colors && Object.keys(colors).length === 2) {
228
- const gradientColor1: TReqoreHexColor = getNthGradientColor(theme, colors);
229
- const gradientColor2: TReqoreHexColor = getNthGradientColor(theme, colors, 2);
271
+ const gradientColor1: TReqoreHexColor = getNthGradientColor(theme, _colors);
272
+ const gradientColor2: TReqoreHexColor = getNthGradientColor(theme, _colors, 2);
230
273
 
231
274
  return mix(
232
275
  0.5,
@@ -0,0 +1,49 @@
1
+ import { useContext, useMemo } from 'react';
2
+ import {
3
+ IReqoreEffect,
4
+ TReqoreEffectGradientAnimationTrigger,
5
+ TReqoreHexColor,
6
+ } from '../components/Effect';
7
+ import { IReqoreTheme } from '../constants/theme';
8
+ import ThemeContext from '../context/ThemeContext';
9
+
10
+ export const useReqoreEffect = (
11
+ component: 'buttons',
12
+ theme: IReqoreTheme,
13
+ effect?: IReqoreEffect
14
+ ): IReqoreEffect => {
15
+ let _theme: IReqoreTheme = useContext<IReqoreTheme>(ThemeContext);
16
+
17
+ // Return the effect if the component is not defined in the theme
18
+ if (!theme[component]) {
19
+ return effect;
20
+ }
21
+
22
+ if (theme) {
23
+ // No other way to conditionally use a hook
24
+ _theme = theme;
25
+ }
26
+
27
+ const colors: TReqoreHexColor = useMemo(() => {
28
+ return _theme[component].gradient ? _theme.main : undefined;
29
+ }, [_theme, effect]);
30
+
31
+ const animate: TReqoreEffectGradientAnimationTrigger = useMemo(() => {
32
+ return _theme[component].animate;
33
+ }, [_theme, effect]);
34
+
35
+ const _effect = useMemo(() => {
36
+ return {
37
+ ...effect,
38
+ gradient: {
39
+ colors,
40
+ animate,
41
+
42
+ // If the user has defined a gradient, we don't want to override it
43
+ ...effect?.gradient,
44
+ },
45
+ };
46
+ }, [colors, animate, effect]);
47
+
48
+ return _effect;
49
+ };
@@ -11,13 +11,14 @@ export interface IReqoreCustomTheme extends Partial<Omit<IReqoreTheme, 'main' |
11
11
  color?: TReqoreEffectColor;
12
12
  dim?: boolean;
13
13
  };
14
+ gradient?: boolean;
14
15
  }
15
16
 
16
17
  export const useReqoreTheme = (
17
18
  element?: string,
18
19
  customTheme: IReqoreCustomTheme = {},
19
20
  intent?: TReqoreIntent
20
- ) => {
21
+ ): IReqoreTheme => {
21
22
  const theme: IReqoreTheme = useContext<IReqoreTheme>(ThemeContext);
22
23
 
23
24
  if (!element) {
package/src/index.tsx CHANGED
@@ -42,7 +42,7 @@ export { ReqoreP, ReqoreP as ReqoreParagraph } from './components/Paragraph';
42
42
  export { default as ReqorePopover } from './components/Popover';
43
43
  export { default as ReqoreRadioGroup } from './components/RadioGroup';
44
44
  export { default as ReqoreSidebar } from './components/Sidebar';
45
- export { ReqoreSpacer } from './components/Spacer';
45
+ export { ReqoreHorizontalSpacer, ReqoreSpacer, ReqoreVerticalSpacer } from './components/Spacer';
46
46
  export { default as ReqoreTable } from './components/Table';
47
47
  export { default as ReqoreTabs } from './components/Tabs';
48
48
  export { default as ReqoreTabsContent } from './components/Tabs/content';
@@ -54,6 +54,8 @@ export { default as ReqoreTextarea } from './components/Textarea';
54
54
  export { TimeAgo as ReqoreTimeAgo } from './components/TimeAgo';
55
55
  export { ReqoreTree } from './components/Tree';
56
56
  export { Colors as ReqoreColors } from './constants/colors';
57
+ export { ReqoreSizes } from './constants/sizes';
58
+ export { ReqoreIntents } from './constants/theme';
57
59
  export { default as ReqoreNotifications } from './containers/ReqoreProvider';
58
60
  export { default as ReqoreUIProvider } from './containers/UIProvider';
59
61
  export { default as ReqoreContext } from './context/ReqoreContext';
@@ -16,7 +16,7 @@ export const MultiSelectItems: TReqoreMultiSelectItem[] = [
16
16
  value: 'Existing item 3',
17
17
  icon: 'DropboxFill',
18
18
  intent: 'info',
19
- rightIcon: 'SunLine',
19
+ rightIcon: 'ArrowRightLine',
20
20
  },
21
21
  {
22
22
  label: 'Existing item 4',
@@ -1,6 +1,7 @@
1
1
  import { ComponentMeta, ComponentStory } from '@storybook/react';
2
2
  import { noop } from 'lodash';
3
3
  import ReqoreButton from '../../components/Button';
4
+ import { IReqoreTheme } from '../../constants/theme';
4
5
  import { ReqoreControlGroup } from '../../index';
5
6
  import { IconArg, SizeArg } from '../utils/args';
6
7
 
@@ -185,6 +186,7 @@ Effect.args = {
185
186
  gradient: {
186
187
  direction: 'to right bottom',
187
188
  colors: { 0: '#33023c', 100: '#0a487b' },
189
+ animate: 'active',
188
190
  },
189
191
  spaced: 2,
190
192
  uppercase: true,
@@ -192,3 +194,15 @@ Effect.args = {
192
194
  textSize: 'small',
193
195
  },
194
196
  };
197
+
198
+ export const GlobalEffect: ComponentStory<
199
+ typeof ReqoreButton & { otherThemeOptions?: IReqoreTheme }
200
+ > = Template.bind({});
201
+ GlobalEffect.args = {
202
+ otherThemeOptions: {
203
+ buttons: {
204
+ gradient: true,
205
+ animate: 'active',
206
+ },
207
+ },
208
+ } as any;
@@ -19,7 +19,7 @@ const Template: ComponentStory<typeof Checkbox> = (args) => {
19
19
  <ReqoreCheckbox {...args} label='Read Only' labelPosition='left' readOnly />
20
20
  </ReqoreControlGroup>
21
21
  <ReqoreControlGroup>
22
- <ReqoreCheckbox {...args} intent='info' />
22
+ <ReqoreCheckbox {...args} intent='info' checked />
23
23
  <ReqoreCheckbox
24
24
  {...args}
25
25
  label='Label'
@@ -1,8 +1,8 @@
1
1
  import { Meta, Story } from '@storybook/react/types-6-0';
2
2
  import { IReqoreControlGroupProps } from '../../components/ControlGroup';
3
3
  import ReqoreInput from '../../components/Input';
4
- import { ReqoreButton, ReqoreControlGroup, ReqoreTag } from '../../index';
5
- import { argManager, GapSizeArg, MinimalArg, SizeArg } from '../utils/args';
4
+ import { ReqoreButton, ReqoreCheckbox, ReqoreControlGroup, ReqoreTag } from '../../index';
5
+ import { GapSizeArg, MinimalArg, SizeArg, argManager } from '../utils/args';
6
6
 
7
7
  const { createArg } = argManager<IReqoreControlGroupProps>();
8
8
 
@@ -36,8 +36,9 @@ export default {
36
36
  const Template: Story<IReqoreControlGroupProps> = (args: IReqoreControlGroupProps) => {
37
37
  return (
38
38
  <ReqoreControlGroup {...args}>
39
- <ReqoreButton>Button</ReqoreButton>
39
+ <ReqoreButton icon='PictureInPictureLine'>Button</ReqoreButton>
40
40
  <ReqoreButton
41
+ icon='PictureInPictureLine'
41
42
  flat={false}
42
43
  effect={{ gradient: { colors: { 0: 'success', 100: 'info:darken:1' } } }}
43
44
  >
@@ -45,11 +46,25 @@ const Template: Story<IReqoreControlGroupProps> = (args: IReqoreControlGroupProp
45
46
  </ReqoreButton>
46
47
  <ReqoreButton maxWidth='300px'>Button with max width</ReqoreButton>
47
48
  <ReqoreTag label='A wild tag appears!' color='main:lighten:2' />
49
+ <ReqoreCheckbox
50
+ asSwitch
51
+ label='Switchy switch'
52
+ margin='both'
53
+ intent='warning'
54
+ checkedIcon='CheckFill'
55
+ checked
56
+ uncheckedIcon='CheckboxBlankLine'
57
+ />
48
58
  <ReqoreInput icon='4KFill' value='Hello' />
49
59
  <ReqoreButton disabled fixed>
50
60
  Disabled & Fixed
51
61
  </ReqoreButton>
62
+ <ReqoreCheckbox checked margin='both'>
63
+ Checkbox
64
+ </ReqoreCheckbox>
65
+
52
66
  <ReqoreButton minimal>Minimal</ReqoreButton>
67
+ <ReqoreTag label='smol tag' size='small' />
53
68
  </ReqoreControlGroup>
54
69
  );
55
70
  };
@@ -8,7 +8,7 @@ import { FlatArg, IconArg, MinimalArg, SizeArg, argManager } from '../utils/args
8
8
  const { createArg } = argManager<IReqoreMultiSelectProps>();
9
9
 
10
10
  export default {
11
- title: 'Components/MultiSelect',
11
+ title: 'Components/Multi Select',
12
12
  parameters: {
13
13
  chromatic: {
14
14
  delay: 500,
@@ -57,6 +57,9 @@ const Template: Story<IReqoreMultiSelectProps> = (args: IReqoreMultiSelectProps)
57
57
  };
58
58
 
59
59
  export const Basic = Template.bind({});
60
+ Basic.args = {
61
+ onItemClickIcon: 'EditLine' as IReqoreIconName,
62
+ };
60
63
  export const Empty = Template.bind({});
61
64
  Empty.args = {
62
65
  value: [],
@@ -181,7 +181,7 @@ WithEffect.args = {
181
181
  type: 'radial',
182
182
  shape: 'ellipse',
183
183
  colors: { 0: '#670079', 100: '#180222' },
184
- //borderColor: '#fff349',
184
+ animate: 'hover',
185
185
  },
186
186
  },
187
187
  headerEffect: {
@@ -127,7 +127,7 @@ const Template: Story<IReqorePopoverProps> = (args: IReqorePopoverProps) => {
127
127
  Full popover
128
128
  </ReqorePopover>
129
129
  <ReqoreControlGroup>
130
- <ReqoreSpacer width={200} />
130
+ <ReqoreSpacer width={350} />
131
131
  <ReqorePopover
132
132
  {...args}
133
133
  component={ReqoreButton}
@@ -36,11 +36,36 @@ const Template: Story<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) =
36
36
  onText: 1,
37
37
  offText: 0,
38
38
  },
39
+ {
40
+ divider: true,
41
+ label: 'Intents',
42
+ },
39
43
  {
40
44
  label: 'Danger option',
41
45
  value: 'danger',
42
46
  intent: 'danger',
43
47
  },
48
+ {
49
+ label: 'Success option',
50
+ value: 'sucess',
51
+ intent: 'success',
52
+ },
53
+ {
54
+ label: 'Pending option',
55
+ value: 'pending',
56
+ intent: 'pending',
57
+ },
58
+ {
59
+ label: 'Info option',
60
+ value: 'info',
61
+ intent: 'info',
62
+ },
63
+ {
64
+ label: 'Warning option',
65
+ value: 'warning',
66
+ intent: 'warning',
67
+ },
68
+
44
69
  {
45
70
  label: 'Effect option',
46
71
  labelPosition: 'left',
@@ -54,6 +79,16 @@ const Template: Story<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) =
54
79
  },
55
80
  },
56
81
  },
82
+ {
83
+ label: 'Effect option with main color gradient and hover animation',
84
+ value: 'effect2',
85
+ effect: {
86
+ gradient: {
87
+ colors: 'main',
88
+ animate: 'hover',
89
+ },
90
+ },
91
+ },
57
92
  {
58
93
  label: 'Text effect & custom theme option',
59
94
  value: 'textEffect',
@@ -97,6 +132,12 @@ const Template: Story<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) =
97
132
  {
98
133
  label: 'Custom Image Option',
99
134
  value: 'customOpt',
135
+ labelEffect: {
136
+ glow: {
137
+ color: 'danger',
138
+ blur: 2,
139
+ },
140
+ },
100
141
  image:
101
142
  'https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4',
102
143
  },
@@ -112,6 +153,12 @@ const Template: Story<IReqoreRadioGroupProps> = (args: IReqoreRadioGroupProps) =
112
153
  label: 'Disabled Option',
113
154
  value: 'opt5',
114
155
  disabled: true,
156
+ labelEffect: {
157
+ glow: {
158
+ color: '#ffffff',
159
+ blur: 0,
160
+ },
161
+ },
115
162
  },
116
163
  ]}
117
164
  onSelectClick={(value) => setSelected(value)}
@@ -0,0 +1,93 @@
1
+ import { Meta, Story } from '@storybook/react/types-6-0';
2
+ import {
3
+ IReqoreSpacerProps,
4
+ ReqoreHorizontalSpacer,
5
+ ReqoreVerticalSpacer,
6
+ } from '../../components/Spacer';
7
+ import { ReqorePanel } from '../../index';
8
+
9
+ export default {
10
+ title: 'Components/Spacer',
11
+ } as Meta;
12
+
13
+ const Template: Story<IReqoreSpacerProps> = () => {
14
+ return (
15
+ <>
16
+ <ReqorePanel label='Horizontal'>
17
+ This is a horizontal spacer with <ReqoreHorizontalSpacer width={50} /> width of 50px
18
+ <br />
19
+ <br />
20
+ This is a horizontal spacer with <ReqoreHorizontalSpacer
21
+ width={10}
22
+ lineSize='normal'
23
+ />{' '}
24
+ width of 10px and lineSize of normal
25
+ <br />
26
+ <br />
27
+ This is a horizontal spacer with <ReqoreHorizontalSpacer width={50} height={100} /> width of
28
+ 50px and height of 100px
29
+ <br />
30
+ <br />
31
+ This is a horizontal spacer with{' '}
32
+ <ReqoreHorizontalSpacer width={50} height={50} lineSize='tiny' intent='info' /> width of
33
+ 50px and height of 50px and lineSize of tiny and intent info
34
+ <br />
35
+ <br />
36
+ This is a horizontal spacer with{' '}
37
+ <ReqoreHorizontalSpacer
38
+ width={50}
39
+ lineSize='huge'
40
+ intent='info'
41
+ effect={{
42
+ gradient: {
43
+ colors: { 0: 'danger:lighten:2', 100: 'danger:darken:2' },
44
+ animate: 'always',
45
+ direction: 'to bottom',
46
+ },
47
+ }}
48
+ />{' '}
49
+ width of 30px and height of auto and lineSize of huge and an effect & animation
50
+ </ReqorePanel>
51
+ <ReqoreVerticalSpacer height={10} />
52
+ <ReqorePanel label='Vertical'>
53
+ This is a vertical spacer with <ReqoreVerticalSpacer height={50} /> height of 50px
54
+ <br />
55
+ <br />
56
+ This is a vertical spacer with <ReqoreVerticalSpacer height={10} lineSize='normal' /> height
57
+ of 10px and lineSize of normal
58
+ <br />
59
+ <br />
60
+ This is a vertical spacer with <ReqoreVerticalSpacer height={50} width={100} /> height of
61
+ 50px and width of 100px
62
+ <br />
63
+ <br />
64
+ This is a vertical spacer with{' '}
65
+ <ReqoreVerticalSpacer width={50} height={50} lineSize='tiny' intent='info' /> width of 50px
66
+ and height of 50px and lineSize of tiny and intent info
67
+ <br />
68
+ <br />
69
+ This is a vertical spacer with{' '}
70
+ <ReqoreVerticalSpacer
71
+ height={50}
72
+ lineSize='tiny'
73
+ effect={{
74
+ gradient: {
75
+ colors: { 0: 'success:lighten:2', 100: 'success:darken' },
76
+ animate: 'always',
77
+ animationSpeed: 5,
78
+ type: 'radial',
79
+ direction: 'to right',
80
+ },
81
+ glow: {
82
+ color: 'success',
83
+ blur: 20,
84
+ },
85
+ }}
86
+ />{' '}
87
+ height of 50px and width of auto and lineSize of tiny and an effect & animation
88
+ </ReqorePanel>
89
+ </>
90
+ );
91
+ };
92
+
93
+ export const Basic = Template.bind({});