@platformatic/ui-components 0.3.5 → 0.4.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 (43) hide show
  1. package/.nvmrc +1 -1
  2. package/dist/assets/{index-BJ-rQoWR.css → index-K_bDNror.css} +1 -1
  3. package/dist/index.html +2 -2
  4. package/dist/main.css +14 -4
  5. package/package.json +11 -10
  6. package/src/components/Button.module.css +3 -0
  7. package/src/components/ButtonOnlyIcon.jsx +1 -1
  8. package/src/components/TooltipAbsolute.module.css +2 -2
  9. package/src/stories/BorderedBox.stories.jsx +3 -1
  10. package/src/stories/Button.stories.jsx +224 -47
  11. package/src/stories/ButtonFullRounded.stories.jsx +31 -6
  12. package/src/stories/ButtonOnlyIcon.stories.jsx +13 -3
  13. package/src/stories/DropDown.stories.jsx +43 -20
  14. package/src/stories/InfoBox.stories.jsx +12 -3
  15. package/src/stories/{Introduction.stories.mdx → Introduction.mdx} +115 -117
  16. package/src/stories/List.stories.jsx +28 -5
  17. package/src/stories/ListElement.stories.jsx +2 -1
  18. package/src/stories/Loadable.stories.jsx +6 -5
  19. package/src/stories/LoadingSpinner.stories.jsx +4 -2
  20. package/src/stories/LogoDropDown.stories.jsx +38 -24
  21. package/src/stories/Modal.stories.jsx +72 -17
  22. package/src/stories/ModalDirectional.stories.jsx +12 -2
  23. package/src/stories/ModalStepsForward.stories.jsx +82 -13
  24. package/src/stories/PlatformaticIcon.stories.jsx +44 -9
  25. package/src/stories/SearchBar.stories.jsx +0 -1
  26. package/src/stories/SearchBarV2.stories.jsx +0 -1
  27. package/src/stories/Sidebar.stories.jsx +41 -10
  28. package/src/stories/TabbedWindow.stories.jsx +71 -31
  29. package/src/stories/TextWithLabel.stories.jsx +5 -1
  30. package/src/stories/Tooltip.stories.jsx +10 -2
  31. package/src/stories/TwoColumnsLayout.stories.jsx +7 -2
  32. package/src/stories/forms/Field.stories.jsx +53 -15
  33. package/src/stories/forms/Input.stories.jsx +8 -2
  34. package/src/stories/forms/InputWithSeparator.stories.jsx +31 -9
  35. package/src/stories/forms/Password.stories.jsx +5 -1
  36. package/src/stories/forms/Preview.stories.jsx +6 -1
  37. package/src/stories/forms/RadioGroup.stories.jsx +5 -1
  38. package/src/stories/forms/Select.stories.jsx +60 -38
  39. package/src/stories/forms/SelectWithInput.stories.jsx +78 -41
  40. package/src/stories/forms/ToggleSwitch.stories.jsx +14 -4
  41. package/src/stories/icons/Icons.stories.jsx +40 -13
  42. package/src/stories/logos/Logos.stories.jsx +9 -2
  43. /package/dist/assets/{index-YI7s19_T.js → index-DxEcxprd.js} +0 -0
@@ -1,7 +1,22 @@
1
1
  'use strict'
2
2
  import React from 'react'
3
3
  import Button from '../components/Button'
4
- import { ALTERNATE_RICH_BLACK, ANTI_FLASH_WHITE, BOX_SHADOW, CHANGE_BACKGROUND_COLOR, COLORS_BUTTON, ERROR_RED, FIRE_ENGINE_RED, HOVER_EFFECTS_BUTTONS, LARGE, RICH_BLACK, SIZES, WHITE, ACTIVE_AND_INACTIVE_STATUS, MEDIUM } from '../components/constants'
4
+ import {
5
+ ALTERNATE_RICH_BLACK,
6
+ ANTI_FLASH_WHITE,
7
+ BOX_SHADOW,
8
+ CHANGE_BACKGROUND_COLOR,
9
+ COLORS_BUTTON,
10
+ ERROR_RED,
11
+ FIRE_ENGINE_RED,
12
+ HOVER_EFFECTS_BUTTONS,
13
+ LARGE,
14
+ RICH_BLACK,
15
+ SIZES,
16
+ WHITE,
17
+ ACTIVE_AND_INACTIVE_STATUS,
18
+ MEDIUM
19
+ } from '../components/constants'
5
20
 
6
21
  const divStyle = {
7
22
  width: '100%',
@@ -73,12 +88,21 @@ OnlyLabel.args = {
73
88
  const AllBorderedTemplate = (args) => {
74
89
  return (
75
90
  <>
76
- {COLORS_BUTTON.map(color => (
91
+ {COLORS_BUTTON.map((color) => (
77
92
  <React.Fragment key={color}>
78
93
  <div className='grid grid-cols-6 gap-2 items-center' key={color}>
79
94
  <span className='text-sm'>{color}</span>
80
- <Button color={color} onClick={() => alert('clicked ' + color)} {...args} />
81
- <Button color={color} onClick={() => alert('clicked ' + color)} disabled {...args} />
95
+ <Button
96
+ color={color}
97
+ onClick={() => alert('clicked ' + color)}
98
+ {...args}
99
+ />
100
+ <Button
101
+ color={color}
102
+ onClick={() => alert('clicked ' + color)}
103
+ disabled
104
+ {...args}
105
+ />
82
106
  </div>
83
107
  <br />
84
108
  </React.Fragment>
@@ -97,12 +121,21 @@ AllBordered.args = {
97
121
  const AllFilledTemplate = (args) => {
98
122
  return (
99
123
  <>
100
- {COLORS_BUTTON.map(color => (
124
+ {COLORS_BUTTON.map((color) => (
101
125
  <React.Fragment key={color}>
102
126
  <div className='grid grid-cols-6 gap-2 items-center'>
103
127
  <span className='text-sm'>{color}</span>
104
- <Button backgroundColor={color} onClick={() => alert('clicked ' + color)} {...args} />
105
- <Button backgroundColor={color} onClick={() => alert('clicked ' + color)} disabled {...args} />
128
+ <Button
129
+ backgroundColor={color}
130
+ onClick={() => alert('clicked ' + color)}
131
+ {...args}
132
+ />
133
+ <Button
134
+ backgroundColor={color}
135
+ onClick={() => alert('clicked ' + color)}
136
+ disabled
137
+ {...args}
138
+ />
106
139
  </div>
107
140
  <br />
108
141
  </React.Fragment>
@@ -125,7 +158,9 @@ AllFilled.args = {
125
158
  const DesignSystem = (args) => {
126
159
  return (
127
160
  <div className='grid grid-cols-5 gap-2 items-center'>
128
- <span className='text-sm text-white col-span-1'>Disabled with Background Color</span>
161
+ <span className='text-sm text-white col-span-1'>
162
+ Disabled with Background Color
163
+ </span>
129
164
  <div className='grid grid-cols-2 gap-x-2 bg-rich-black p-2 col-span-2'>
130
165
  <Button
131
166
  color={RICH_BLACK}
@@ -156,7 +191,9 @@ const DesignSystem = (args) => {
156
191
  bordered={false}
157
192
  disabled
158
193
  hoverEffect={CHANGE_BACKGROUND_COLOR}
159
- hoverEffectProperties={{ changeBackgroundColor: ALTERNATE_RICH_BLACK }}
194
+ hoverEffectProperties={{
195
+ changeBackgroundColor: ALTERNATE_RICH_BLACK
196
+ }}
160
197
  {...args}
161
198
  />
162
199
  <Button
@@ -170,7 +207,9 @@ const DesignSystem = (args) => {
170
207
  {...args}
171
208
  />
172
209
  </div>
173
- <span className='text-sm text-white col-span-1'>Default with Background Color</span>
210
+ <span className='text-sm text-white col-span-1'>
211
+ Default with Background Color
212
+ </span>
174
213
  <div className='grid grid-cols-2 gap-x-2 bg-rich-black p-2 col-span-2'>
175
214
  <Button
176
215
  color={RICH_BLACK}
@@ -198,7 +237,9 @@ const DesignSystem = (args) => {
198
237
  onClick={() => alert('clicked Default RICH_BLACK')}
199
238
  bordered={false}
200
239
  hoverEffect={CHANGE_BACKGROUND_COLOR}
201
- hoverEffectProperties={{ changeBackgroundColor: ALTERNATE_RICH_BLACK }}
240
+ hoverEffectProperties={{
241
+ changeBackgroundColor: ALTERNATE_RICH_BLACK
242
+ }}
202
243
  {...args}
203
244
  />
204
245
  <Button
@@ -211,7 +252,9 @@ const DesignSystem = (args) => {
211
252
  {...args}
212
253
  />
213
254
  </div>
214
- <span className='text-sm text-white col-span-1'>Disabled with Background Color 2</span>
255
+ <span className='text-sm text-white col-span-1'>
256
+ Disabled with Background Color 2
257
+ </span>
215
258
  <div className='grid grid-cols-2 gap-x-2 bg-rich-black p-2 col-span-2'>
216
259
  <Button
217
260
  color={RICH_BLACK}
@@ -221,8 +264,16 @@ const DesignSystem = (args) => {
221
264
  disabled
222
265
  hoverEffect={CHANGE_BACKGROUND_COLOR}
223
266
  hoverEffectProperties={{ changeBackgroundColor: ANTI_FLASH_WHITE }}
224
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: RICH_BLACK }}
225
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: RICH_BLACK }}
267
+ platformaticIcon={{
268
+ iconName: 'GearIcon',
269
+ size: MEDIUM,
270
+ color: RICH_BLACK
271
+ }}
272
+ platformaticIconAfter={{
273
+ iconName: 'GearIcon',
274
+ size: MEDIUM,
275
+ color: RICH_BLACK
276
+ }}
226
277
  {...args}
227
278
  />
228
279
  <Button
@@ -233,8 +284,16 @@ const DesignSystem = (args) => {
233
284
  disabled
234
285
  hoverEffect={CHANGE_BACKGROUND_COLOR}
235
286
  hoverEffectProperties={{ changeBackgroundColor: FIRE_ENGINE_RED }}
236
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
237
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
287
+ platformaticIcon={{
288
+ iconName: 'GearIcon',
289
+ size: MEDIUM,
290
+ color: WHITE
291
+ }}
292
+ platformaticIconAfter={{
293
+ iconName: 'GearIcon',
294
+ size: MEDIUM,
295
+ color: WHITE
296
+ }}
238
297
  {...args}
239
298
  />
240
299
  </div>
@@ -246,9 +305,19 @@ const DesignSystem = (args) => {
246
305
  bordered={false}
247
306
  disabled
248
307
  hoverEffect={CHANGE_BACKGROUND_COLOR}
249
- hoverEffectProperties={{ changeBackgroundColor: ALTERNATE_RICH_BLACK }}
250
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
251
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
308
+ hoverEffectProperties={{
309
+ changeBackgroundColor: ALTERNATE_RICH_BLACK
310
+ }}
311
+ platformaticIcon={{
312
+ iconName: 'GearIcon',
313
+ size: MEDIUM,
314
+ color: WHITE
315
+ }}
316
+ platformaticIconAfter={{
317
+ iconName: 'GearIcon',
318
+ size: MEDIUM,
319
+ color: WHITE
320
+ }}
252
321
  {...args}
253
322
  />
254
323
  <Button
@@ -259,12 +328,22 @@ const DesignSystem = (args) => {
259
328
  disabled
260
329
  hoverEffect={CHANGE_BACKGROUND_COLOR}
261
330
  hoverEffectProperties={{ changeBackgroundColor: FIRE_ENGINE_RED }}
262
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
263
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
331
+ platformaticIcon={{
332
+ iconName: 'GearIcon',
333
+ size: MEDIUM,
334
+ color: WHITE
335
+ }}
336
+ platformaticIconAfter={{
337
+ iconName: 'GearIcon',
338
+ size: MEDIUM,
339
+ color: WHITE
340
+ }}
264
341
  {...args}
265
342
  />
266
343
  </div>
267
- <span className='text-sm text-white col-span-1'>Default with Background Color 2</span>
344
+ <span className='text-sm text-white col-span-1'>
345
+ Default with Background Color 2
346
+ </span>
268
347
  <div className='grid grid-cols-2 gap-x-2 bg-rich-black p-2 col-span-2'>
269
348
  <Button
270
349
  color={RICH_BLACK}
@@ -273,8 +352,16 @@ const DesignSystem = (args) => {
273
352
  hoverEffect={CHANGE_BACKGROUND_COLOR}
274
353
  hoverEffectProperties={{ changeBackgroundColor: ANTI_FLASH_WHITE }}
275
354
  bordered={false}
276
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: RICH_BLACK }}
277
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: RICH_BLACK }}
355
+ platformaticIcon={{
356
+ iconName: 'GearIcon',
357
+ size: MEDIUM,
358
+ color: RICH_BLACK
359
+ }}
360
+ platformaticIconAfter={{
361
+ iconName: 'GearIcon',
362
+ size: MEDIUM,
363
+ color: RICH_BLACK
364
+ }}
278
365
  {...args}
279
366
  />
280
367
  <Button
@@ -284,8 +371,16 @@ const DesignSystem = (args) => {
284
371
  hoverEffect={CHANGE_BACKGROUND_COLOR}
285
372
  hoverEffectProperties={{ changeBackgroundColor: FIRE_ENGINE_RED }}
286
373
  bordered={false}
287
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
288
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
374
+ platformaticIcon={{
375
+ iconName: 'GearIcon',
376
+ size: MEDIUM,
377
+ color: WHITE
378
+ }}
379
+ platformaticIconAfter={{
380
+ iconName: 'GearIcon',
381
+ size: MEDIUM,
382
+ color: WHITE
383
+ }}
289
384
  {...args}
290
385
  />
291
386
  </div>
@@ -296,9 +391,19 @@ const DesignSystem = (args) => {
296
391
  onClick={() => alert('clicked Default RICH_BLACK')}
297
392
  bordered={false}
298
393
  hoverEffect={CHANGE_BACKGROUND_COLOR}
299
- hoverEffectProperties={{ changeBackgroundColor: ALTERNATE_RICH_BLACK }}
300
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
301
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
394
+ hoverEffectProperties={{
395
+ changeBackgroundColor: ALTERNATE_RICH_BLACK
396
+ }}
397
+ platformaticIcon={{
398
+ iconName: 'GearIcon',
399
+ size: MEDIUM,
400
+ color: WHITE
401
+ }}
402
+ platformaticIconAfter={{
403
+ iconName: 'GearIcon',
404
+ size: MEDIUM,
405
+ color: WHITE
406
+ }}
302
407
  {...args}
303
408
  />
304
409
  <Button
@@ -308,8 +413,16 @@ const DesignSystem = (args) => {
308
413
  hoverEffect={CHANGE_BACKGROUND_COLOR}
309
414
  hoverEffectProperties={{ changeBackgroundColor: FIRE_ENGINE_RED }}
310
415
  bordered={false}
311
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
312
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
416
+ platformaticIcon={{
417
+ iconName: 'GearIcon',
418
+ size: MEDIUM,
419
+ color: WHITE
420
+ }}
421
+ platformaticIconAfter={{
422
+ iconName: 'GearIcon',
423
+ size: MEDIUM,
424
+ color: WHITE
425
+ }}
313
426
  {...args}
314
427
  />
315
428
  </div>
@@ -400,8 +513,16 @@ const DesignSystem = (args) => {
400
513
  bordered={false}
401
514
  disabled
402
515
  hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
403
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
404
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
516
+ platformaticIcon={{
517
+ iconName: 'GearIcon',
518
+ size: MEDIUM,
519
+ color: WHITE
520
+ }}
521
+ platformaticIconAfter={{
522
+ iconName: 'GearIcon',
523
+ size: MEDIUM,
524
+ color: WHITE
525
+ }}
405
526
  {...args}
406
527
  />
407
528
  <Button
@@ -411,8 +532,16 @@ const DesignSystem = (args) => {
411
532
  bordered={false}
412
533
  disabled
413
534
  hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
414
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: ERROR_RED }}
415
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: ERROR_RED }}
535
+ platformaticIcon={{
536
+ iconName: 'GearIcon',
537
+ size: MEDIUM,
538
+ color: ERROR_RED
539
+ }}
540
+ platformaticIconAfter={{
541
+ iconName: 'GearIcon',
542
+ size: MEDIUM,
543
+ color: ERROR_RED
544
+ }}
416
545
  {...args}
417
546
  />
418
547
  </div>
@@ -424,8 +553,16 @@ const DesignSystem = (args) => {
424
553
  bordered={false}
425
554
  disabled
426
555
  hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
427
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: RICH_BLACK }}
428
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: RICH_BLACK }}
556
+ platformaticIcon={{
557
+ iconName: 'GearIcon',
558
+ size: MEDIUM,
559
+ color: RICH_BLACK
560
+ }}
561
+ platformaticIconAfter={{
562
+ iconName: 'GearIcon',
563
+ size: MEDIUM,
564
+ color: RICH_BLACK
565
+ }}
429
566
  {...args}
430
567
  />
431
568
  <Button
@@ -435,8 +572,16 @@ const DesignSystem = (args) => {
435
572
  bordered={false}
436
573
  disabled
437
574
  hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
438
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: ERROR_RED }}
439
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: ERROR_RED }}
575
+ platformaticIcon={{
576
+ iconName: 'GearIcon',
577
+ size: MEDIUM,
578
+ color: ERROR_RED
579
+ }}
580
+ platformaticIconAfter={{
581
+ iconName: 'GearIcon',
582
+ size: MEDIUM,
583
+ color: ERROR_RED
584
+ }}
440
585
  {...args}
441
586
  />
442
587
  </div>
@@ -448,8 +593,16 @@ const DesignSystem = (args) => {
448
593
  onClick={() => alert('clicked Default WHITE')}
449
594
  hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
450
595
  bordered={false}
451
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
452
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: WHITE }}
596
+ platformaticIcon={{
597
+ iconName: 'GearIcon',
598
+ size: MEDIUM,
599
+ color: WHITE
600
+ }}
601
+ platformaticIconAfter={{
602
+ iconName: 'GearIcon',
603
+ size: MEDIUM,
604
+ color: WHITE
605
+ }}
453
606
  {...args}
454
607
  />
455
608
  <Button
@@ -458,8 +611,16 @@ const DesignSystem = (args) => {
458
611
  onClick={() => alert('clicked Default ERROR_RED')}
459
612
  hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
460
613
  bordered={false}
461
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: ERROR_RED }}
462
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: ERROR_RED }}
614
+ platformaticIcon={{
615
+ iconName: 'GearIcon',
616
+ size: MEDIUM,
617
+ color: ERROR_RED
618
+ }}
619
+ platformaticIconAfter={{
620
+ iconName: 'GearIcon',
621
+ size: MEDIUM,
622
+ color: ERROR_RED
623
+ }}
463
624
  {...args}
464
625
  />
465
626
  </div>
@@ -470,8 +631,16 @@ const DesignSystem = (args) => {
470
631
  onClick={() => alert('clicked Default RICH_BLACK')}
471
632
  bordered={false}
472
633
  hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
473
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: RICH_BLACK }}
474
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: RICH_BLACK }}
634
+ platformaticIcon={{
635
+ iconName: 'GearIcon',
636
+ size: MEDIUM,
637
+ color: RICH_BLACK
638
+ }}
639
+ platformaticIconAfter={{
640
+ iconName: 'GearIcon',
641
+ size: MEDIUM,
642
+ color: RICH_BLACK
643
+ }}
475
644
  {...args}
476
645
  />
477
646
  <Button
@@ -480,8 +649,16 @@ const DesignSystem = (args) => {
480
649
  onClick={() => alert('clicked Default ERROR_RED')}
481
650
  hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
482
651
  bordered={false}
483
- platformaticIcon={{ iconName: 'GearIcon', size: MEDIUM, color: ERROR_RED }}
484
- platformaticIconAfter={{ iconName: 'GearIcon', size: MEDIUM, color: ERROR_RED }}
652
+ platformaticIcon={{
653
+ iconName: 'GearIcon',
654
+ size: MEDIUM,
655
+ color: ERROR_RED
656
+ }}
657
+ platformaticIconAfter={{
658
+ iconName: 'GearIcon',
659
+ size: MEDIUM,
660
+ color: ERROR_RED
661
+ }}
485
662
  {...args}
486
663
  />
487
664
  </div>
@@ -1,6 +1,12 @@
1
1
  'use strict'
2
2
  import ButtonFullRounded from '../components/ButtonFullRounded'
3
- import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE } from '../components/constants'
3
+ import {
4
+ COLORS_ICON,
5
+ SIZES,
6
+ SMALL,
7
+ MEDIUM,
8
+ LARGE
9
+ } from '../components/constants'
4
10
  import Icons from '../components/icons'
5
11
 
6
12
  const divStyle = {
@@ -62,7 +68,9 @@ SingleButton.args = {
62
68
  }
63
69
 
64
70
  const AllCircleButtonsTemplate = (args) => {
65
- const icons = Object.keys(Icons).filter(icon => icon.indexOf('Circle') > -1)
71
+ const icons = Object.keys(Icons).filter(
72
+ (icon) => icon.indexOf('Circle') > -1
73
+ )
66
74
 
67
75
  return (
68
76
  <>
@@ -71,16 +79,33 @@ const AllCircleButtonsTemplate = (args) => {
71
79
  {icons.map((icon, index) => (
72
80
  <div style={row} key={index}>
73
81
  <div style={col}>
74
- <p style={paragraph}>#{index + 1}: {icon}</p>
82
+ <p style={paragraph}>
83
+ #{index + 1}: {icon}
84
+ </p>
75
85
  </div>
76
86
  <div style={col}>
77
- <ButtonFullRounded key={icon} iconName={icon} iconSize={SMALL} {...args} />
87
+ <ButtonFullRounded
88
+ key={icon}
89
+ iconName={icon}
90
+ iconSize={SMALL}
91
+ {...args}
92
+ />
78
93
  </div>
79
94
  <div style={col}>
80
- <ButtonFullRounded key={icon} iconName={icon} iconSize={MEDIUM} {...args} />
95
+ <ButtonFullRounded
96
+ key={icon}
97
+ iconName={icon}
98
+ iconSize={MEDIUM}
99
+ {...args}
100
+ />
81
101
  </div>
82
102
  <div style={col}>
83
- <ButtonFullRounded key={icon} iconName={icon} iconSize={LARGE} {...args} />
103
+ <ButtonFullRounded
104
+ key={icon}
105
+ iconName={icon}
106
+ iconSize={LARGE}
107
+ {...args}
108
+ />
84
109
  </div>
85
110
  </div>
86
111
  ))}
@@ -1,7 +1,15 @@
1
1
  'use strict'
2
2
  import React from 'react'
3
3
  import ButtonOnlyIcon from '../components/ButtonOnlyIcon'
4
- import { COLORS_BUTTON, HOVER_EFFECTS_BUTTONS, SIZES, WHITE, RICH_BLACK, DULLS_BACKGROUND_COLOR, SMALL } from '../components/constants'
4
+ import {
5
+ COLORS_BUTTON,
6
+ HOVER_EFFECTS_BUTTONS,
7
+ SIZES,
8
+ WHITE,
9
+ RICH_BLACK,
10
+ DULLS_BACKGROUND_COLOR,
11
+ SMALL
12
+ } from '../components/constants'
5
13
 
6
14
  const divStyle = {
7
15
  width: '100%',
@@ -62,14 +70,16 @@ export default {
62
70
  }
63
71
  }
64
72
 
65
- const OnlyIconTemplate = (args) => (<ButtonOnlyIcon {...args} />)
73
+ const OnlyIconTemplate = (args) => <ButtonOnlyIcon {...args} />
66
74
 
67
75
  export const OnlyIcon = OnlyIconTemplate.bind({})
68
76
 
69
77
  OnlyIcon.args = {
70
78
  color: WHITE,
71
79
  backgroundColor: RICH_BLACK,
72
- onClick: () => { alert('hit!') },
80
+ onClick: () => {
81
+ alert('hit!')
82
+ },
73
83
  hoverEffect: DULLS_BACKGROUND_COLOR,
74
84
  platformaticIcon: { size: SMALL, iconName: 'RunningIcon', color: WHITE }
75
85
  }
@@ -4,11 +4,17 @@ import BorderedBox from '../components/BorderedBox'
4
4
  import Button from '../components/Button'
5
5
  import HorizontalSeparator from '../components/HorizontalSeparator'
6
6
  import { useState } from 'react'
7
- import { BOX_SHADOW, LIGHT_BLUE, MAIN_DARK_BLUE, RICH_BLACK, WHITE } from '../components/constants'
7
+ import {
8
+ BOX_SHADOW,
9
+ LIGHT_BLUE,
10
+ MAIN_DARK_BLUE,
11
+ RICH_BLACK,
12
+ WHITE
13
+ } from '../components/constants'
8
14
  export default {
9
15
  title: 'Platformatic/DropDown',
10
16
  component: DropDown,
11
- decorators: [dd => <div className='text-white'>{dd()}</div>]
17
+ decorators: [(dd) => <div className='text-white'>{dd()}</div>]
12
18
  }
13
19
 
14
20
  const Template = (args) => (
@@ -22,7 +28,11 @@ const Template = (args) => (
22
28
  const ContentThatLoads = () => {
23
29
  const [content, setContent] = useState(null)
24
30
  setTimeout(() => {
25
- setContent(<div className='mt-4'><BorderedBox>This is rendered after</BorderedBox></div>)
31
+ setContent(
32
+ <div className='mt-4'>
33
+ <BorderedBox>This is rendered after</BorderedBox>
34
+ </div>
35
+ )
26
36
  }, 1000)
27
37
 
28
38
  return content
@@ -33,9 +43,15 @@ export const DefaultAlignment = Template.bind({})
33
43
  DefaultAlignment.args = {
34
44
  header: 'My Menu',
35
45
  items: [
36
- <span className='text-white' key='1'>Menu 1</span>,
37
- <span className='text-white' key='2'>Menu 2</span>,
38
- <span className='text-white' key='3'>This is a very long menu item</span>
46
+ <span className='text-white' key='1'>
47
+ Menu 1
48
+ </span>,
49
+ <span className='text-white' key='2'>
50
+ Menu 2
51
+ </span>,
52
+ <span className='text-white' key='3'>
53
+ This is a very long menu item
54
+ </span>
39
55
  ]
40
56
  }
41
57
 
@@ -62,18 +78,19 @@ withButton.args = {
62
78
  <span key='2'>Menu 2</span>,
63
79
  <span key='3'>This is a very long menu item</span>
64
80
  ],
65
- lastButton: <Button
66
- backgroundColor={MAIN_DARK_BLUE}
67
- color={WHITE}
68
- label='Test'
69
- platformaticIcon={{ iconName: 'WorkspaceStaticIcon', color: WHITE }}
70
- fullWidth
71
- bold
72
- bordered={false}
73
- hoverEffect={BOX_SHADOW}
74
- />,
81
+ lastButton: (
82
+ <Button
83
+ backgroundColor={MAIN_DARK_BLUE}
84
+ color={WHITE}
85
+ label='Test'
86
+ platformaticIcon={{ iconName: 'WorkspaceStaticIcon', color: WHITE }}
87
+ fullWidth
88
+ bold
89
+ bordered={false}
90
+ hoverEffect={BOX_SHADOW}
91
+ />
92
+ ),
75
93
  borderColor: MAIN_DARK_BLUE
76
-
77
94
  }
78
95
 
79
96
  export const BlackVersion = Template.bind({})
@@ -83,8 +100,14 @@ BlackVersion.args = {
83
100
  backgroundColor: RICH_BLACK,
84
101
  borderColor: WHITE,
85
102
  items: [
86
- <span className='text-white' key='1'>Menu 1</span>,
87
- <span className='text-white' key='2'>Menu 2</span>,
88
- <span className='text-white' key='3'>Menu3</span>
103
+ <span className='text-white' key='1'>
104
+ Menu 1
105
+ </span>,
106
+ <span className='text-white' key='2'>
107
+ Menu 2
108
+ </span>,
109
+ <span className='text-white' key='3'>
110
+ Menu3
111
+ </span>
89
112
  ]
90
113
  }
@@ -20,7 +20,11 @@ export default {
20
20
  ]
21
21
  }
22
22
 
23
- const Template = (args) => <InfoBox {...args}><p>this will be your custom title</p></InfoBox>
23
+ const Template = (args) => (
24
+ <InfoBox {...args}>
25
+ <p>this will be your custom title</p>
26
+ </InfoBox>
27
+ )
24
28
  export const InfoBoxSample = Template.bind({})
25
29
  InfoBoxSample.args = {
26
30
  iconName: 'UpgradeIcon',
@@ -32,11 +36,16 @@ InfoBoxSample.args = {
32
36
  }
33
37
  }
34
38
 
35
- const ContainedTemplate = (args) => <div style={{ maxWidth: '300px' }}><InfoBox {...args} /></div>
39
+ const ContainedTemplate = (args) => (
40
+ <div style={{ maxWidth: '300px' }}>
41
+ <InfoBox {...args} />
42
+ </div>
43
+ )
36
44
  export const InfoBoxContained = ContainedTemplate.bind({})
37
45
  InfoBoxContained.args = {
38
46
  iconName: 'UpgradeIcon',
39
- helpText: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et dui facilisis, molestie urna sed, volutpat nibh.',
47
+ helpText:
48
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et dui facilisis, molestie urna sed, volutpat nibh.',
40
49
  buttonProps: {
41
50
  label: 'Sample button',
42
51
  color: 'white',