@platformatic/ui-components 0.3.6 → 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 (40) 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/stories/BorderedBox.stories.jsx +3 -1
  7. package/src/stories/Button.stories.jsx +224 -47
  8. package/src/stories/ButtonFullRounded.stories.jsx +31 -6
  9. package/src/stories/ButtonOnlyIcon.stories.jsx +13 -3
  10. package/src/stories/DropDown.stories.jsx +43 -20
  11. package/src/stories/InfoBox.stories.jsx +12 -3
  12. package/src/stories/{Introduction.stories.mdx → Introduction.mdx} +115 -117
  13. package/src/stories/List.stories.jsx +28 -5
  14. package/src/stories/ListElement.stories.jsx +2 -1
  15. package/src/stories/Loadable.stories.jsx +6 -5
  16. package/src/stories/LoadingSpinner.stories.jsx +4 -2
  17. package/src/stories/LogoDropDown.stories.jsx +38 -24
  18. package/src/stories/Modal.stories.jsx +72 -17
  19. package/src/stories/ModalDirectional.stories.jsx +12 -2
  20. package/src/stories/ModalStepsForward.stories.jsx +82 -13
  21. package/src/stories/PlatformaticIcon.stories.jsx +44 -9
  22. package/src/stories/SearchBar.stories.jsx +0 -1
  23. package/src/stories/SearchBarV2.stories.jsx +0 -1
  24. package/src/stories/Sidebar.stories.jsx +41 -10
  25. package/src/stories/TabbedWindow.stories.jsx +71 -31
  26. package/src/stories/TextWithLabel.stories.jsx +5 -1
  27. package/src/stories/Tooltip.stories.jsx +10 -2
  28. package/src/stories/TwoColumnsLayout.stories.jsx +7 -2
  29. package/src/stories/forms/Field.stories.jsx +53 -15
  30. package/src/stories/forms/Input.stories.jsx +8 -2
  31. package/src/stories/forms/InputWithSeparator.stories.jsx +31 -9
  32. package/src/stories/forms/Password.stories.jsx +5 -1
  33. package/src/stories/forms/Preview.stories.jsx +6 -1
  34. package/src/stories/forms/RadioGroup.stories.jsx +5 -1
  35. package/src/stories/forms/Select.stories.jsx +60 -38
  36. package/src/stories/forms/SelectWithInput.stories.jsx +78 -41
  37. package/src/stories/forms/ToggleSwitch.stories.jsx +14 -4
  38. package/src/stories/icons/Icons.stories.jsx +40 -13
  39. package/src/stories/logos/Logos.stories.jsx +9 -2
  40. /package/dist/assets/{index-YI7s19_T.js → index-DxEcxprd.js} +0 -0
@@ -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',
@@ -1,4 +1,4 @@
1
- import { Meta } from '@storybook/addon-docs';
1
+ import { Meta } from '@storybook/blocks';
2
2
  import Code from './assets/code-brackets.svg';
3
3
  import Colors from './assets/colors.svg';
4
4
  import Comments from './assets/comments.svg';
@@ -12,106 +12,106 @@ import StackAlt from './assets/stackalt.svg';
12
12
 
13
13
  <style>
14
14
  {`
15
- .subheading {
16
- --mediumdark: '#999999';
17
- font-weight: 900;
18
- font-size: 13px;
19
- color: #999;
20
- letter-spacing: 6px;
21
- line-height: 24px;
22
- text-transform: uppercase;
23
- margin-bottom: 12px;
24
- margin-top: 40px;
25
- }
26
-
27
- .link-list {
28
- display: grid;
29
- grid-template-columns: 1fr;
30
- grid-template-rows: 1fr 1fr;
31
- row-gap: 10px;
32
- }
33
-
34
- @media (min-width: 620px) {
15
+ .subheading {
16
+ --mediumdark: '#999999';
17
+ font-weight: 900;
18
+ font-size: 13px;
19
+ color: #999;
20
+ letter-spacing: 6px;
21
+ line-height: 24px;
22
+ text-transform: uppercase;
23
+ margin-bottom: 12px;
24
+ margin-top: 40px;
25
+ }
26
+
27
+ .link-list {
28
+ display: grid;
29
+ grid-template-columns: 1fr;
30
+ grid-template-rows: 1fr 1fr;
31
+ row-gap: 10px;
32
+ }
33
+
34
+ @media (min-width: 620px) {
35
+ .link-list {
36
+ row-gap: 20px;
37
+ column-gap: 20px;
38
+ grid-template-columns: 1fr 1fr;
39
+ }
40
+ }
41
+
42
+ @media all and (-ms-high-contrast:none) {
35
43
  .link-list {
36
- row-gap: 20px;
37
- column-gap: 20px;
38
- grid-template-columns: 1fr 1fr;
44
+ display: -ms-grid;
45
+ -ms-grid-columns: 1fr 1fr;
46
+ -ms-grid-rows: 1fr 1fr;
47
+ }
48
+ }
49
+
50
+ .link-item {
51
+ display: block;
52
+ padding: 20px 30px 20px 15px;
53
+ border: 1px solid #00000010;
54
+ border-radius: 5px;
55
+ transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
56
+ color: #333333;
57
+ display: flex;
58
+ align-items: flex-start;
59
+ }
60
+
61
+ .link-item:hover {
62
+ border-color: #1EA7FD50;
63
+ transform: translate3d(0, -3px, 0);
64
+ box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
65
+ }
66
+
67
+ .link-item:active {
68
+ border-color: #1EA7FD;
69
+ transform: translate3d(0, 0, 0);
70
+ }
71
+
72
+ .link-item strong {
73
+ font-weight: 700;
74
+ display: block;
75
+ margin-bottom: 2px;
76
+ }
77
+
78
+ .link-item img {
79
+ height: 40px;
80
+ width: 40px;
81
+ margin-right: 15px;
82
+ flex: none;
83
+ }
84
+
85
+ .link-item span {
86
+ font-size: 14px;
87
+ line-height: 20px;
39
88
  }
40
- }
41
89
 
42
- @media all and (-ms-high-contrast:none) {
43
- .link-list {
44
- display: -ms-grid;
45
- -ms-grid-columns: 1fr 1fr;
46
- -ms-grid-rows: 1fr 1fr;
90
+ .tip {
91
+ display: inline-block;
92
+ border-radius: 1em;
93
+ font-size: 11px;
94
+ line-height: 12px;
95
+ font-weight: 700;
96
+ background: #E7FDD8;
97
+ color: #66BF3C;
98
+ padding: 4px 12px;
99
+ margin-right: 10px;
100
+ vertical-align: top;
47
101
  }
48
- }
49
-
50
- .link-item {
51
- display: block;
52
- padding: 20px 30px 20px 15px;
53
- border: 1px solid #00000010;
54
- border-radius: 5px;
55
- transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
56
- color: #333333;
57
- display: flex;
58
- align-items: flex-start;
59
- }
60
-
61
- .link-item:hover {
62
- border-color: #1EA7FD50;
63
- transform: translate3d(0, -3px, 0);
64
- box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
65
- }
66
-
67
- .link-item:active {
68
- border-color: #1EA7FD;
69
- transform: translate3d(0, 0, 0);
70
- }
71
-
72
- .link-item strong {
73
- font-weight: 700;
74
- display: block;
75
- margin-bottom: 2px;
76
- }
77
-
78
- .link-item img {
79
- height: 40px;
80
- width: 40px;
81
- margin-right: 15px;
82
- flex: none;
83
- }
84
-
85
- .link-item span {
86
- font-size: 14px;
87
- line-height: 20px;
88
- }
89
-
90
- .tip {
91
- display: inline-block;
92
- border-radius: 1em;
93
- font-size: 11px;
94
- line-height: 12px;
95
- font-weight: 700;
96
- background: #E7FDD8;
97
- color: #66BF3C;
98
- padding: 4px 12px;
99
- margin-right: 10px;
100
- vertical-align: top;
101
- }
102
-
103
- .tip-wrapper {
104
- font-size: 13px;
105
- line-height: 20px;
106
- margin-top: 40px;
107
- margin-bottom: 40px;
108
- }
109
-
110
- .tip-wrapper code {
111
- font-size: 12px;
112
- display: inline-block;
113
- }
114
- `}
102
+
103
+ .tip-wrapper {
104
+ font-size: 13px;
105
+ line-height: 20px;
106
+ margin-top: 40px;
107
+ margin-bottom: 40px;
108
+ }
109
+
110
+ .tip-wrapper code {
111
+ font-size: 12px;
112
+ display: inline-block;
113
+ }
114
+ `}
115
115
  </style>
116
116
 
117
117
  # Welcome to Storybook
@@ -126,45 +126,36 @@ We recommend building UIs with a [**component-driven**](https://componentdriven.
126
126
  <div className="subheading">Configure</div>
127
127
 
128
128
  <div className="link-list">
129
- <a
130
- className="link-item"
131
- href="https://storybook.js.org/docs/react/addons/addon-types"
132
- target="_blank"
133
- >
129
+ <a className="link-item" href="https://storybook.js.org/docs/react/addons/addon-types" target="_blank">
134
130
  <img src={Plugin} alt="plugin" />
131
+
135
132
  <span>
136
133
  <strong>Presets for popular tools</strong>
137
134
  Easy setup for TypeScript, SCSS and more.
138
135
  </span>
139
136
  </a>
140
- <a
141
- className="link-item"
142
- href="https://storybook.js.org/docs/react/configure/webpack"
143
- target="_blank"
144
- >
137
+
138
+ <a className="link-item" href="https://storybook.js.org/docs/react/configure/webpack" target="_blank">
145
139
  <img src={StackAlt} alt="Build" />
140
+
146
141
  <span>
147
142
  <strong>Build configuration</strong>
148
143
  How to customize webpack and Babel
149
144
  </span>
150
145
  </a>
151
- <a
152
- className="link-item"
153
- href="https://storybook.js.org/docs/react/configure/styling-and-css"
154
- target="_blank"
155
- >
146
+
147
+ <a className="link-item" href="https://storybook.js.org/docs/react/configure/styling-and-css" target="_blank">
156
148
  <img src={Colors} alt="colors" />
149
+
157
150
  <span>
158
151
  <strong>Styling</strong>
159
152
  How to load and configure CSS libraries
160
153
  </span>
161
154
  </a>
162
- <a
163
- className="link-item"
164
- href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
165
- target="_blank"
166
- >
155
+
156
+ <a className="link-item" href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack" target="_blank">
167
157
  <img src={Flow} alt="flow" />
158
+
168
159
  <span>
169
160
  <strong>Data</strong>
170
161
  Providers and mocking for data libraries
@@ -177,27 +168,34 @@ We recommend building UIs with a [**component-driven**](https://componentdriven.
177
168
  <div className="link-list">
178
169
  <a className="link-item" href="https://storybook.js.org/docs" target="_blank">
179
170
  <img src={Repo} alt="repo" />
171
+
180
172
  <span>
181
173
  <strong>Storybook documentation</strong>
182
174
  Configure, customize, and extend
183
175
  </span>
184
176
  </a>
177
+
185
178
  <a className="link-item" href="https://storybook.js.org/tutorials/" target="_blank">
186
179
  <img src={Direction} alt="direction" />
180
+
187
181
  <span>
188
182
  <strong>In-depth guides</strong>
189
183
  Best practices from leading teams
190
184
  </span>
191
185
  </a>
186
+
192
187
  <a className="link-item" href="https://github.com/storybookjs/storybook" target="_blank">
193
188
  <img src={Code} alt="code" />
189
+
194
190
  <span>
195
191
  <strong>GitHub project</strong>
196
192
  View the source and add issues
197
193
  </span>
198
194
  </a>
195
+
199
196
  <a className="link-item" href="https://discord.gg/storybook" target="_blank">
200
197
  <img src={Comments} alt="comments" />
198
+
201
199
  <span>
202
200
  <strong>Discord chat</strong>
203
201
  Chat with maintainers and the community
@@ -23,8 +23,17 @@ ListWithNoElements.args = {
23
23
 
24
24
  const TemplateWithElements = (args) => (
25
25
  <List {...args}>
26
- <ListElement title='List Element 1' detail='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et dui facilisis, molestie urna sed, volutpat nibh.' />
27
- <ListElement title='List Element 2' detail='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et dui facilisis, molestie urna sed, volutpat nibh.' detailColor={MAIN_DARK_BLUE} titleColor={MAIN_DARK_BLUE} semiBold={false} />
26
+ <ListElement
27
+ title='List Element 1'
28
+ detail='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et dui facilisis, molestie urna sed, volutpat nibh.'
29
+ />
30
+ <ListElement
31
+ title='List Element 2'
32
+ detail='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et dui facilisis, molestie urna sed, volutpat nibh.'
33
+ detailColor={MAIN_DARK_BLUE}
34
+ titleColor={MAIN_DARK_BLUE}
35
+ semiBold={false}
36
+ />
28
37
  </List>
29
38
  )
30
39
 
@@ -51,13 +60,27 @@ ListWithElementsVariants.args = {
51
60
  const TemplateWithElementsOnWhiteDiv = (args) => (
52
61
  <div style={divStyle}>
53
62
  <List {...args}>
54
- <ListElement title='List Element 1' marginSize='small' detailColor={MAIN_DARK_BLUE} titleColor={MAIN_DARK_BLUE} semiBold={false} />
55
- <ListElement title='List Element 2' marginSize='small' detailColor={MAIN_DARK_BLUE} titleColor={MAIN_DARK_BLUE} semiBold={false} />
63
+ <ListElement
64
+ title='List Element 1'
65
+ marginSize='small'
66
+ detailColor={MAIN_DARK_BLUE}
67
+ titleColor={MAIN_DARK_BLUE}
68
+ semiBold={false}
69
+ />
70
+ <ListElement
71
+ title='List Element 2'
72
+ marginSize='small'
73
+ detailColor={MAIN_DARK_BLUE}
74
+ titleColor={MAIN_DARK_BLUE}
75
+ semiBold={false}
76
+ />
56
77
  </List>
57
78
  </div>
58
79
  )
59
80
 
60
- export const ListWithElementsOnWhiteDiv = TemplateWithElementsOnWhiteDiv.bind({})
81
+ export const ListWithElementsOnWhiteDiv = TemplateWithElementsOnWhiteDiv.bind(
82
+ {}
83
+ )
61
84
  ListWithElementsOnWhiteDiv.args = {
62
85
  title: 'List Title on White div'
63
86
  }
@@ -11,5 +11,6 @@ const Template = (args) => <ListElement {...args} />
11
11
  export const ListElementFull = Template.bind({})
12
12
  ListElementFull.args = {
13
13
  title: 'List Element Title',
14
- detail: 'Lorem Ipsum dolor sit amet consectetur adipiscing elit. Qui enim potest, nisi quis potest, negare'
14
+ detail:
15
+ 'Lorem Ipsum dolor sit amet consectetur adipiscing elit. Qui enim potest, nisi quis potest, negare'
15
16
  }
@@ -15,10 +15,11 @@ const ContentThatLoads = ({ startLoading }) => {
15
15
  return <BorderedBox>{loremIpsum}</BorderedBox>
16
16
  }
17
17
 
18
- export const Loading = args =>
18
+ export const Loading = (args) => (
19
19
  <Loadable {...args}>
20
20
  <ContentThatLoads />
21
21
  </Loadable>
22
+ )
22
23
  Loading.args = {}
23
24
 
24
25
  const ContentThatLoadsAndStops = ({ startLoading, stopLoading }) => {
@@ -32,7 +33,7 @@ const ContentThatLoadsAndStops = ({ startLoading, stopLoading }) => {
32
33
  return <BorderedBox>{loremIpsum}</BorderedBox>
33
34
  }
34
35
 
35
- export const LoadsAndStops = args => {
36
+ export const LoadsAndStops = (args) => {
36
37
  return (
37
38
  <Loadable {...args}>
38
39
  <ContentThatLoadsAndStops />
@@ -41,7 +42,7 @@ export const LoadsAndStops = args => {
41
42
  }
42
43
  LoadsAndStops.args = {}
43
44
 
44
- export const LoadsAndStops2 = args => {
45
+ export const LoadsAndStops2 = (args) => {
45
46
  return (
46
47
  <Loadable {...args}>
47
48
  <ContentThatLoadsAndStops />
@@ -51,7 +52,7 @@ export const LoadsAndStops2 = args => {
51
52
  }
52
53
  LoadsAndStops2.args = {}
53
54
 
54
- const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
55
+ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
55
56
  const ContentThatToggle = ({ startLoading, stopLoading }) => {
56
57
  useEffect(() => {
57
58
  startLoading()
@@ -65,7 +66,7 @@ const ContentThatToggle = ({ startLoading, stopLoading }) => {
65
66
  }, [])
66
67
  return <BorderedBox>{loremIpsum}</BorderedBox>
67
68
  }
68
- export const Toggle = args => {
69
+ export const Toggle = (args) => {
69
70
  return (
70
71
  <Loadable {...args}>
71
72
  <ContentThatToggle />
@@ -3,17 +3,19 @@ import LoadingSpinner from '../components/LoadingSpinner'
3
3
  import Button from '../components/Button'
4
4
  import BorderedBox from '../components/BorderedBox'
5
5
 
6
- const loremIpsum = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus est nisl, maximus aliquet urna eu, consequat semper nisi. Nam vel elit feugiat dui congue elementum. Sed turpis urna, egestas at pharetra et, lacinia ac mauris. Pellentesque cursus, ipsum nec malesuada ornare, dui purus ultrices elit, non blandit nisi quam non nisi. Suspendisse sapien leo, ultricies pretium vulputate sed, malesuada sed justo. Suspendisse euismod erat ut lacus feugiat malesuada. In tempor a eros et egestas. Nam pretium dolor sollicitudin, cursus sem vitae, elementum enim. Nam in nisi ipsum.'
6
+ const loremIpsum =
7
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus est nisl, maximus aliquet urna eu, consequat semper nisi. Nam vel elit feugiat dui congue elementum. Sed turpis urna, egestas at pharetra et, lacinia ac mauris. Pellentesque cursus, ipsum nec malesuada ornare, dui purus ultrices elit, non blandit nisi quam non nisi. Suspendisse sapien leo, ultricies pretium vulputate sed, malesuada sed justo. Suspendisse euismod erat ut lacus feugiat malesuada. In tempor a eros et egestas. Nam pretium dolor sollicitudin, cursus sem vitae, elementum enim. Nam in nisi ipsum.'
7
8
 
8
9
  export default {
9
10
  title: 'Platformatic/LoadingSpinner',
10
11
  component: LoadingSpinner
11
12
  }
12
13
 
13
- export const Loading = args =>
14
+ export const Loading = (args) => (
14
15
  <LoadingSpinner {...args}>
15
16
  <BorderedBox>{loremIpsum}</BorderedBox>
16
17
  </LoadingSpinner>
18
+ )
17
19
 
18
20
  Loading.args = {
19
21
  loading: true