@platformatic/ui-components 0.1.32 → 0.1.33

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 (102) hide show
  1. package/.github/workflows/ci.yml +26 -26
  2. package/.nvmrc +1 -1
  3. package/LICENSE +201 -201
  4. package/README.md +26 -26
  5. package/dist/main.css +31 -18
  6. package/fonts/Montserrat/README.txt +81 -81
  7. package/index.html +12 -12
  8. package/index.js +58 -58
  9. package/package.json +76 -76
  10. package/postcss.config.cjs +8 -8
  11. package/public/api-icon-closed.svg +6 -6
  12. package/public/api-icon.svg +9 -9
  13. package/src/App.jsx +12 -12
  14. package/src/components/BorderedBox.jsx +16 -16
  15. package/src/components/BorderedBox.module.css +2 -2
  16. package/src/components/BorderedText.jsx +8 -8
  17. package/src/components/BorderedText.module.css +2 -2
  18. package/src/components/Box.jsx +14 -14
  19. package/src/components/Box.module.css +7 -7
  20. package/src/components/Button.jsx +23 -23
  21. package/src/components/Button.module.css +20 -20
  22. package/src/components/Common.module.css +7 -7
  23. package/src/components/DetailedMetric.jsx +32 -32
  24. package/src/components/DetailedMetric.module.css +2 -2
  25. package/src/components/DropDown.jsx +35 -35
  26. package/src/components/DropDown.module.css +22 -22
  27. package/src/components/FollowUs.jsx +35 -35
  28. package/src/components/FollowUs.module.css +11 -11
  29. package/src/components/GHLoginButton.jsx +14 -14
  30. package/src/components/HorizontalSeparator.jsx +9 -5
  31. package/src/components/Input.jsx +11 -11
  32. package/src/components/Input.module.css +7 -7
  33. package/src/components/List.jsx +20 -20
  34. package/src/components/List.module.css +11 -11
  35. package/src/components/ListElement.jsx +23 -23
  36. package/src/components/ListElement.module.css +23 -23
  37. package/src/components/Loadable.jsx +34 -34
  38. package/src/components/Loadable.module.css +13 -13
  39. package/src/components/LoginButton.jsx +17 -17
  40. package/src/components/LoginButton.module.css +7 -7
  41. package/src/components/LoginButton.test.jsx +25 -25
  42. package/src/components/Logo.jsx +58 -58
  43. package/src/components/Main.jsx +33 -33
  44. package/src/components/MetricValue.jsx +15 -15
  45. package/src/components/MetricValue.module.css +7 -7
  46. package/src/components/Modal.jsx +29 -29
  47. package/src/components/Modal.module.css +24 -24
  48. package/src/components/Playground.jsx +9 -9
  49. package/src/components/SearchBar.jsx +63 -63
  50. package/src/components/SearchBar.module.css +20 -20
  51. package/src/components/SimpleMetric.jsx +32 -32
  52. package/src/components/SimpleMetric.module.css +6 -6
  53. package/src/components/Status.jsx +26 -26
  54. package/src/components/TabbedWindow.jsx +34 -34
  55. package/src/components/TabbedWindow.module.css +16 -16
  56. package/src/components/TextWithLabel.jsx +11 -11
  57. package/src/components/TextWithLabel.module.css +8 -8
  58. package/src/components/Versions.jsx +9 -9
  59. package/src/components/VerticalSeparator.jsx +5 -5
  60. package/src/components/icons/ApiEmptyIcon.jsx +107 -107
  61. package/src/components/icons/ApiIcon.jsx +29 -29
  62. package/src/components/icons/ApiIconClosed.jsx +19 -19
  63. package/src/components/icons/CloseModalIcon.jsx +26 -26
  64. package/src/components/icons/PullRequestIcon.jsx +31 -31
  65. package/src/components/icons/index.js +9 -9
  66. package/src/components/layouts/Layout.jsx +11 -11
  67. package/src/components/layouts/TwoColumnsLayout.jsx +12 -12
  68. package/src/components/layouts/TwoColumnsLayout.module.css +9 -9
  69. package/src/hooks/useEscapeKey.js +20 -20
  70. package/src/lib/utils.js +23 -23
  71. package/src/main.jsx +9 -9
  72. package/src/stories/BorderedBox.stories.jsx +33 -33
  73. package/src/stories/BorderedText.stories.jsx +24 -24
  74. package/src/stories/Button.stories.jsx +107 -107
  75. package/src/stories/DetailedMetric.stories.jsx +33 -33
  76. package/src/stories/DropDown.stories.jsx +62 -62
  77. package/src/stories/FollowUs.stories.jsx +14 -14
  78. package/src/stories/GHLoginButton.stories.jsx +14 -14
  79. package/src/stories/HorizontalSeparator.stories.jsx +12 -12
  80. package/src/stories/Input.stories.jsx +15 -15
  81. package/src/stories/Introduction.stories.mdx +211 -211
  82. package/src/stories/List.stories.jsx +29 -29
  83. package/src/stories/ListElement.stories.jsx +15 -15
  84. package/src/stories/Loadable.stories.jsx +75 -75
  85. package/src/stories/LoginButton.stories.jsx +15 -15
  86. package/src/stories/Logo.stories.jsx +17 -17
  87. package/src/stories/Modal.stories.jsx +65 -65
  88. package/src/stories/SearchBar.stories.jsx +28 -28
  89. package/src/stories/SimpleMetric.stories.jsx +41 -41
  90. package/src/stories/Status.stories.jsx +31 -31
  91. package/src/stories/TextWithLabel.stories.jsx +25 -25
  92. package/src/stories/TwoColumnsLayout.stories.jsx +42 -42
  93. package/src/styles/main.css +15 -15
  94. package/tailwind.config.cjs +37 -37
  95. package/vite.config.js +6 -6
  96. package/vitest.config.js +14 -14
  97. package/dist/api-icon-closed.svg +0 -6
  98. package/dist/api-icon.svg +0 -9
  99. package/dist/assets/index.5ac5acb7.js +0 -797
  100. package/dist/assets/index.d3f5882c.css +0 -1
  101. package/dist/index.html +0 -14
  102. package/dist/vite.svg +0 -1
@@ -1,15 +1,15 @@
1
- import React from 'react'
2
- import LoginButton from '../components/LoginButton'
3
-
4
- export default {
5
- title: 'Platformatic/LoginButton',
6
- component: LoginButton
7
- }
8
-
9
- const Template = (args) => <LoginButton {...args} />
10
-
11
- export const NoIcon = Template.bind({})
12
- NoIcon.args = {
13
- label: 'Click here',
14
- onClick: () => alert('clicked')
15
- }
1
+ import React from 'react'
2
+ import LoginButton from '../components/LoginButton'
3
+
4
+ export default {
5
+ title: 'Platformatic/LoginButton',
6
+ component: LoginButton
7
+ }
8
+
9
+ const Template = (args) => <LoginButton {...args} />
10
+
11
+ export const NoIcon = Template.bind({})
12
+ NoIcon.args = {
13
+ label: 'Click here',
14
+ onClick: () => alert('clicked')
15
+ }
@@ -1,17 +1,17 @@
1
- import React from 'react'
2
- import Logo from '../components/Logo'
3
-
4
- export default {
5
- title: 'Platformatic/Logo',
6
- component: Logo
7
- }
8
-
9
- const Template = (args) => <Logo {...args} />
10
- export const LogoLarge = Template.bind({})
11
- LogoLarge.args = {
12
- width: 300,
13
- heigth: 300
14
- }
15
-
16
- export const LogoNormal = Template.bind({})
17
- LogoNormal.args = {}
1
+ import React from 'react'
2
+ import Logo from '../components/Logo'
3
+
4
+ export default {
5
+ title: 'Platformatic/Logo',
6
+ component: Logo
7
+ }
8
+
9
+ const Template = (args) => <Logo {...args} />
10
+ export const LogoLarge = Template.bind({})
11
+ LogoLarge.args = {
12
+ width: 300,
13
+ heigth: 300
14
+ }
15
+
16
+ export const LogoNormal = Template.bind({})
17
+ LogoNormal.args = {}
@@ -1,65 +1,65 @@
1
- import React, { useState } from 'react'
2
- import Modal from '../components/Modal'
3
- import Button from '../components/Button'
4
- import BorderedBox from '../components/BorderedBox'
5
- import DropDown from '../components/DropDown'
6
- import HorizontalSeparator from '../components/HorizontalSeparator'
7
- export default {
8
- title: 'Platformatic/Modal',
9
- component: Modal
10
- }
11
-
12
- const Template = (args) => {
13
- const [isOpen, setIsOpen] = useState(false)
14
- return (
15
- <main>
16
- <BorderedBox>This Is another Content</BorderedBox>
17
- <ContentThatLoads />
18
- <Button color='green' primary='true' onClick={() => setIsOpen(true)} label='Open Modal' />
19
- {isOpen && <Modal setIsOpen={setIsOpen} title='Modal Title'>{args.text}</Modal>}
20
- </main>
21
- )
22
- }
23
-
24
- const ContentThatLoads = () => {
25
- const [content, setContent] = useState(null)
26
- setTimeout(() => {
27
- setContent(<div className='mt-4'><BorderedBox>This is a Future Component</BorderedBox></div>)
28
- }, 1000)
29
-
30
- return content
31
- }
32
-
33
- export const Default = Template.bind({})
34
- Default.args = {
35
- title: 'List Title',
36
- text: 'Hello World'
37
- }
38
-
39
- export const WithLongText = Template.bind({})
40
-
41
- WithLongText.args = {
42
- title: 'Modal',
43
- text: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi fermentum, lorem nec tincidunt pellentesque, odio orci posuere lacus, et hendrerit turpis dolor nec metus. Nunc quis finibus enim. Vestibulum a mollis velit. Ut nec vestibulum urna. Phasellus ut odio nec leo hendrerit laoreet eget at turpis. Nulla facilisi. Vivamus accumsan arcu malesuada, imperdiet ligula vitae, varius elit. Morbi blandit eros nec eros rutrum mattis. Nulla nibh nisi, pellentesque a ornare at, ultrices sit amet felis. Nulla bibendum metus diam, vitae gravida dui semper iaculis.
44
-
45
- `.repeat(5)
46
- }
47
-
48
- const MenuTemplate = () => {
49
- const [isOpen, setIsOpen] = useState(false)
50
- const dropDownArgs = {
51
- header: 'My Menu',
52
- items: [
53
- <span className='hover:cursor-pointer' key='2' onClick={() => setIsOpen(true)}>Show Modal</span>
54
- ]
55
- }
56
- return (
57
- <div>
58
- <div className='text-white'><DropDown {...dropDownArgs} /></div>
59
- <HorizontalSeparator />
60
- {isOpen && <Modal setIsOpen={setIsOpen} title='Modal Title'>Hello world!</Modal>}
61
- <ContentThatLoads />
62
- </div>
63
- )
64
- }
65
- export const WithDropDown = MenuTemplate.bind({})
1
+ import React, { useState } from 'react'
2
+ import Modal from '../components/Modal'
3
+ import Button from '../components/Button'
4
+ import BorderedBox from '../components/BorderedBox'
5
+ import DropDown from '../components/DropDown'
6
+ import HorizontalSeparator from '../components/HorizontalSeparator'
7
+ export default {
8
+ title: 'Platformatic/Modal',
9
+ component: Modal
10
+ }
11
+
12
+ const Template = (args) => {
13
+ const [isOpen, setIsOpen] = useState(false)
14
+ return (
15
+ <main>
16
+ <BorderedBox>This Is another Content</BorderedBox>
17
+ <ContentThatLoads />
18
+ <Button color='green' primary='true' onClick={() => setIsOpen(true)} label='Open Modal' />
19
+ {isOpen && <Modal setIsOpen={setIsOpen} title='Modal Title'>{args.text}</Modal>}
20
+ </main>
21
+ )
22
+ }
23
+
24
+ const ContentThatLoads = () => {
25
+ const [content, setContent] = useState(null)
26
+ setTimeout(() => {
27
+ setContent(<div className='mt-4'><BorderedBox>This is a Future Component</BorderedBox></div>)
28
+ }, 1000)
29
+
30
+ return content
31
+ }
32
+
33
+ export const Default = Template.bind({})
34
+ Default.args = {
35
+ title: 'List Title',
36
+ text: 'Hello World'
37
+ }
38
+
39
+ export const WithLongText = Template.bind({})
40
+
41
+ WithLongText.args = {
42
+ title: 'Modal',
43
+ text: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi fermentum, lorem nec tincidunt pellentesque, odio orci posuere lacus, et hendrerit turpis dolor nec metus. Nunc quis finibus enim. Vestibulum a mollis velit. Ut nec vestibulum urna. Phasellus ut odio nec leo hendrerit laoreet eget at turpis. Nulla facilisi. Vivamus accumsan arcu malesuada, imperdiet ligula vitae, varius elit. Morbi blandit eros nec eros rutrum mattis. Nulla nibh nisi, pellentesque a ornare at, ultrices sit amet felis. Nulla bibendum metus diam, vitae gravida dui semper iaculis.
44
+
45
+ `.repeat(5)
46
+ }
47
+
48
+ const MenuTemplate = () => {
49
+ const [isOpen, setIsOpen] = useState(false)
50
+ const dropDownArgs = {
51
+ header: 'My Menu',
52
+ items: [
53
+ <span className='hover:cursor-pointer' key='2' onClick={() => setIsOpen(true)}>Show Modal</span>
54
+ ]
55
+ }
56
+ return (
57
+ <div>
58
+ <div className='text-white'><DropDown {...dropDownArgs} /></div>
59
+ <HorizontalSeparator />
60
+ {isOpen && <Modal setIsOpen={setIsOpen} title='Modal Title'>Hello world!</Modal>}
61
+ <ContentThatLoads />
62
+ </div>
63
+ )
64
+ }
65
+ export const WithDropDown = MenuTemplate.bind({})
@@ -1,28 +1,28 @@
1
- 'use strict'
2
- import SearchBar from '../components/SearchBar'
3
- export default {
4
- title: 'Platformatic/SearchBar',
5
- component: SearchBar,
6
- argTypes: {
7
- onChange: { control: 'function' },
8
- onSubmit: { control: 'function' },
9
- title: { control: 'text' }
10
- }
11
- }
12
- const Template = (args) => {
13
- return (
14
- <>
15
- <SearchBar {...args}>Hello Platformatic</SearchBar>
16
- </>
17
-
18
- )
19
- }
20
- export const Standard = Template.bind({})
21
- Standard.args = {
22
- onChange: (value) => {
23
- console.log('Current search: ' + value)
24
- },
25
- onSubmit: (value) => {
26
- alert('Query value: ' + value)
27
- }
28
- }
1
+ 'use strict'
2
+ import SearchBar from '../components/SearchBar'
3
+ export default {
4
+ title: 'Platformatic/SearchBar',
5
+ component: SearchBar,
6
+ argTypes: {
7
+ onChange: { control: 'function' },
8
+ onSubmit: { control: 'function' },
9
+ title: { control: 'text' }
10
+ }
11
+ }
12
+ const Template = (args) => {
13
+ return (
14
+ <>
15
+ <SearchBar {...args}>Hello Platformatic</SearchBar>
16
+ </>
17
+
18
+ )
19
+ }
20
+ export const Standard = Template.bind({})
21
+ Standard.args = {
22
+ onChange: (value) => {
23
+ console.log('Current search: ' + value)
24
+ },
25
+ onSubmit: (value) => {
26
+ alert('Query value: ' + value)
27
+ }
28
+ }
@@ -1,41 +1,41 @@
1
- 'use strict'
2
-
3
- import SimpleMetric from '../components/SimpleMetric'
4
-
5
- export default {
6
- title: 'Platformatic/SimpleMetric',
7
- component: SimpleMetric
8
- }
9
-
10
- const Template = (args) => <SimpleMetric {...args} />
11
-
12
- export const Green = Template.bind({})
13
-
14
- Green.args = {
15
- title: 'Requests',
16
- color: 'green',
17
- unit: 'ms',
18
- value: 120,
19
- tooltip: 'This is a tooltip for the metric'
20
- }
21
-
22
- export const Red = Template.bind({})
23
-
24
- Red.args = {
25
- title: 'Requests',
26
- color: 'red',
27
- unit: 'ms',
28
- value: 120,
29
- tooltip: 'This is a tooltip for the metric'
30
- }
31
-
32
- export const WithPrefix = Template.bind({})
33
-
34
- WithPrefix.args = {
35
- title: 'Requests',
36
- color: 'green',
37
- unit: 'ms',
38
- value: 120,
39
- pre: 'P90',
40
- tooltip: 'This is a tooltip for the metric'
41
- }
1
+ 'use strict'
2
+
3
+ import SimpleMetric from '../components/SimpleMetric'
4
+
5
+ export default {
6
+ title: 'Platformatic/SimpleMetric',
7
+ component: SimpleMetric
8
+ }
9
+
10
+ const Template = (args) => <SimpleMetric {...args} />
11
+
12
+ export const Green = Template.bind({})
13
+
14
+ Green.args = {
15
+ title: 'Requests',
16
+ color: 'green',
17
+ unit: 'ms',
18
+ value: 120,
19
+ tooltip: 'This is a tooltip for the metric'
20
+ }
21
+
22
+ export const Red = Template.bind({})
23
+
24
+ Red.args = {
25
+ title: 'Requests',
26
+ color: 'red',
27
+ unit: 'ms',
28
+ value: 120,
29
+ tooltip: 'This is a tooltip for the metric'
30
+ }
31
+
32
+ export const WithPrefix = Template.bind({})
33
+
34
+ WithPrefix.args = {
35
+ title: 'Requests',
36
+ color: 'green',
37
+ unit: 'ms',
38
+ value: 120,
39
+ pre: 'P90',
40
+ tooltip: 'This is a tooltip for the metric'
41
+ }
@@ -1,31 +1,31 @@
1
- 'use strict'
2
- import Status from '../components/Status'
3
-
4
- export default {
5
- title: 'Platformatic/Status',
6
- component: Status,
7
- argTypes: {}
8
- }
9
-
10
- const Template = (args) => <Status {...args} />
11
-
12
- export const White = Template.bind({})
13
-
14
- White.args = {
15
- color: 'white',
16
- status: 'available'
17
- }
18
-
19
- export const Green = Template.bind({})
20
-
21
- Green.args = {
22
- color: 'green',
23
- status: 'online'
24
- }
25
-
26
- export const Red = Template.bind({})
27
-
28
- Red.args = {
29
- color: 'red',
30
- status: 'offline'
31
- }
1
+ 'use strict'
2
+ import Status from '../components/Status'
3
+
4
+ export default {
5
+ title: 'Platformatic/Status',
6
+ component: Status,
7
+ argTypes: {}
8
+ }
9
+
10
+ const Template = (args) => <Status {...args} />
11
+
12
+ export const White = Template.bind({})
13
+
14
+ White.args = {
15
+ color: 'white',
16
+ status: 'available'
17
+ }
18
+
19
+ export const Green = Template.bind({})
20
+
21
+ Green.args = {
22
+ color: 'green',
23
+ status: 'online'
24
+ }
25
+
26
+ export const Red = Template.bind({})
27
+
28
+ Red.args = {
29
+ color: 'red',
30
+ status: 'offline'
31
+ }
@@ -1,25 +1,25 @@
1
- 'use strict'
2
-
3
- import TextWithLabel from '../components/TextWithLabel'
4
- export default {
5
- title: 'Platformatic/TextWithLabel',
6
- component: TextWithLabel,
7
- argTypes: {
8
- label: { control: 'text' },
9
- text: { control: 'text' }
10
- }
11
- }
12
- const Template = (args) => <TextWithLabel {...args} />
13
-
14
- export const Standard = Template.bind({})
15
-
16
- Standard.args = {
17
- label: 'Created By',
18
- text: 'Platformatic Team'
19
- }
20
-
21
- export const WithLink = (args) => <TextWithLabel {...args}><a href='https://example.com'>Standard Link</a></TextWithLabel>
22
-
23
- WithLink.args = {
24
- label: 'External Link'
25
- }
1
+ 'use strict'
2
+
3
+ import TextWithLabel from '../components/TextWithLabel'
4
+ export default {
5
+ title: 'Platformatic/TextWithLabel',
6
+ component: TextWithLabel,
7
+ argTypes: {
8
+ label: { control: 'text' },
9
+ text: { control: 'text' }
10
+ }
11
+ }
12
+ const Template = (args) => <TextWithLabel {...args} />
13
+
14
+ export const Standard = Template.bind({})
15
+
16
+ Standard.args = {
17
+ label: 'Created By',
18
+ text: 'Platformatic Team'
19
+ }
20
+
21
+ export const WithLink = (args) => <TextWithLabel {...args}><a href='https://example.com'>Standard Link</a></TextWithLabel>
22
+
23
+ WithLink.args = {
24
+ label: 'External Link'
25
+ }
@@ -1,42 +1,42 @@
1
- 'use strict'
2
- import TwoColumnsLayout from '../components/layouts/TwoColumnsLayout'
3
- import BorderedBox from '../components/BorderedBox'
4
- export default {
5
- title: 'Platformatic/TwoColumnsLayout',
6
- component: TwoColumnsLayout
7
- // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
8
- /* argTypes: {
9
- gridTemplate: {
10
- type: 'string',
11
- control: {
12
- type: 'radio',
13
- options: ['Default', 'Columns', 'Rows', 'Responsive' ],
14
- }
15
- }
16
- } */
17
- }
18
-
19
- // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
20
- const Template = (args) => <TwoColumnsLayout {...args}><BorderedBox>1st</BorderedBox><BorderedBox>2nd</BorderedBox></TwoColumnsLayout>
21
-
22
- export const Default = Template.bind({})
23
-
24
- Default.args = { }
25
-
26
- export const Columns = Template.bind({})
27
-
28
- Columns.args = {
29
- gridTemplate: 'columns'
30
- }
31
-
32
- export const Rows = Template.bind({})
33
-
34
- Rows.args = {
35
- gridTemplate: 'rows'
36
- }
37
-
38
- export const Responsive = Template.bind({})
39
-
40
- Responsive.args = {
41
- gridTemplate: 'responsive'
42
- }
1
+ 'use strict'
2
+ import TwoColumnsLayout from '../components/layouts/TwoColumnsLayout'
3
+ import BorderedBox from '../components/BorderedBox'
4
+ export default {
5
+ title: 'Platformatic/TwoColumnsLayout',
6
+ component: TwoColumnsLayout
7
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
8
+ /* argTypes: {
9
+ gridTemplate: {
10
+ type: 'string',
11
+ control: {
12
+ type: 'radio',
13
+ options: ['Default', 'Columns', 'Rows', 'Responsive' ],
14
+ }
15
+ }
16
+ } */
17
+ }
18
+
19
+ // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
20
+ const Template = (args) => <TwoColumnsLayout {...args}><BorderedBox>1st</BorderedBox><BorderedBox>2nd</BorderedBox></TwoColumnsLayout>
21
+
22
+ export const Default = Template.bind({})
23
+
24
+ Default.args = { }
25
+
26
+ export const Columns = Template.bind({})
27
+
28
+ Columns.args = {
29
+ gridTemplate: 'columns'
30
+ }
31
+
32
+ export const Rows = Template.bind({})
33
+
34
+ Rows.args = {
35
+ gridTemplate: 'rows'
36
+ }
37
+
38
+ export const Responsive = Template.bind({})
39
+
40
+ Responsive.args = {
41
+ gridTemplate: 'responsive'
42
+ }
@@ -1,16 +1,16 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- :root {
6
- @apply bg-main-dark-blue;
7
- font-family: 'Montserrat';
8
- }
9
- a {
10
- @apply text-tertiary-blue;
11
- }
12
-
13
- input {
14
- background-color: transparent;
15
-
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ :root {
6
+ @apply bg-main-dark-blue;
7
+ font-family: 'Montserrat';
8
+ }
9
+ a {
10
+ @apply text-tertiary-blue;
11
+ }
12
+
13
+ input {
14
+ background-color: transparent;
15
+
16
16
  }
@@ -1,37 +1,37 @@
1
- /** @type {import('tailwindcss').Config} */
2
- module.exports = {
3
- content: ['./src/**/*.{html,jsx}'],
4
- theme: {
5
- container: {
6
- center: true
7
- },
8
- extend: {
9
- screens: {
10
- 'lg': '1440px',
11
- // => @media (min-width: 1440px) { ... }
12
- },
13
- },
14
- colors: {
15
- 'main-green': '#21FA90',
16
- 'dark-green': '#02783F',
17
- 'light-green': '#21F190',
18
- 'main-dark-blue': '#00283D',
19
- 'dark-blue': '#00344F',
20
- white: '#FFFFFF',
21
- 'error-red': '#FA2121',
22
- 'tertiary-blue': '#2588E4'
23
- },
24
- fontFamily: {
25
- sans: ['Montserrat']
26
- }
27
- },
28
- safelist: [
29
- 'border-error-red',
30
- 'border-main-green',
31
- 'text-3xl',
32
- 'text-4xl',
33
- 'text-5xl',
34
- 'text-6xl'
35
- ],
36
- plugins: []
37
- }
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ content: ['./src/**/*.{html,jsx}'],
4
+ theme: {
5
+ container: {
6
+ center: true
7
+ },
8
+ extend: {
9
+ screens: {
10
+ 'lg': '1440px',
11
+ // => @media (min-width: 1440px) { ... }
12
+ },
13
+ },
14
+ colors: {
15
+ 'main-green': '#21FA90',
16
+ 'dark-green': '#02783F',
17
+ 'light-green': '#21F190',
18
+ 'main-dark-blue': '#00283D',
19
+ 'dark-blue': '#00344F',
20
+ white: '#FFFFFF',
21
+ 'error-red': '#FA2121',
22
+ 'tertiary-blue': '#2588E4'
23
+ },
24
+ fontFamily: {
25
+ sans: ['Montserrat']
26
+ }
27
+ },
28
+ safelist: [
29
+ 'border-error-red',
30
+ 'border-main-green',
31
+ 'text-3xl',
32
+ 'text-4xl',
33
+ 'text-5xl',
34
+ 'text-6xl'
35
+ ],
36
+ plugins: []
37
+ }
package/vite.config.js CHANGED
@@ -1,6 +1,6 @@
1
- import { defineConfig } from 'vite'
2
- import react from '@vitejs/plugin-react'
3
- /** @type {import('vite').UserConfig} */
4
- export default defineConfig({
5
- plugins: [react()]
6
- })
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+ /** @type {import('vite').UserConfig} */
4
+ export default defineConfig({
5
+ plugins: [react()]
6
+ })