@inc2734/unitone-css 0.47.2 → 0.48.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 (89) hide show
  1. package/README.md +1 -1
  2. package/dist/app.css +1 -1
  3. package/dist/app.js +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/library.js +1 -1
  6. package/package.json +8 -14
  7. package/src/app.js +50 -11
  8. package/src/layout-primitives/both-sides/index.jsx +1 -0
  9. package/src/layout-primitives/center/_center.scss +1 -6
  10. package/src/layout-primitives/center/index.jsx +2 -1
  11. package/src/layout-primitives/cluster/index.jsx +1 -0
  12. package/src/layout-primitives/container/index.jsx +1 -0
  13. package/src/layout-primitives/cover/_cover.scss +1 -0
  14. package/src/layout-primitives/cover/index.jsx +1 -0
  15. package/src/layout-primitives/decorator/index.jsx +1 -0
  16. package/src/layout-primitives/float/_float.scss +4 -4
  17. package/src/layout-primitives/float/index.jsx +2 -1
  18. package/src/layout-primitives/frame/index.jsx +1 -0
  19. package/src/layout-primitives/gutters/index.jsx +1 -0
  20. package/src/layout-primitives/layers/_layers.scss +21 -8
  21. package/src/layout-primitives/layers/index.jsx +5 -2
  22. package/src/layout-primitives/reel/index.jsx +1 -0
  23. package/src/layout-primitives/responsive-grid/index.jsx +1 -0
  24. package/src/layout-primitives/stack/index.jsx +1 -0
  25. package/src/layout-primitives/switcher/index.jsx +1 -0
  26. package/src/layout-primitives/text/index.jsx +3 -1
  27. package/src/layout-primitives/vertical-writing/index.jsx +4 -1
  28. package/src/layout-primitives/with-sidebar/index.jsx +1 -0
  29. package/src/library.js +2 -1
  30. package/dist/storybook.css +0 -1
  31. package/src/layout-primitives/both-sides/README.md +0 -143
  32. package/src/layout-primitives/both-sides/stories/index.stories.jsx +0 -49
  33. package/src/layout-primitives/center/README.md +0 -113
  34. package/src/layout-primitives/center/stories/index.stories.jsx +0 -63
  35. package/src/layout-primitives/cluster/README.md +0 -133
  36. package/src/layout-primitives/cluster/stories/index.stories.jsx +0 -135
  37. package/src/layout-primitives/container/README.md +0 -93
  38. package/src/layout-primitives/container/stories/index.stories.jsx +0 -65
  39. package/src/layout-primitives/cover/README.md +0 -195
  40. package/src/layout-primitives/cover/stories/index.stories.jsx +0 -179
  41. package/src/layout-primitives/decorator/README.md +0 -179
  42. package/src/layout-primitives/decorator/stories/index.stories.jsx +0 -198
  43. package/src/layout-primitives/float/README.md +0 -115
  44. package/src/layout-primitives/float/stories/index.stories.jsx +0 -78
  45. package/src/layout-primitives/frame/README.md +0 -67
  46. package/src/layout-primitives/frame/stories/index.stories.jsx +0 -50
  47. package/src/layout-primitives/gutters/README.md +0 -47
  48. package/src/layout-primitives/gutters/stories/index.stories.jsx +0 -48
  49. package/src/layout-primitives/layers/README.md +0 -307
  50. package/src/layout-primitives/layers/stories/index.stories.jsx +0 -187
  51. package/src/layout-primitives/reel/README.md +0 -115
  52. package/src/layout-primitives/reel/stories/index.stories.jsx +0 -80
  53. package/src/layout-primitives/responsive-grid/README.md +0 -130
  54. package/src/layout-primitives/responsive-grid/stories/index.stories.jsx +0 -234
  55. package/src/layout-primitives/stack/README.md +0 -98
  56. package/src/layout-primitives/stack/stories/index.stories.jsx +0 -193
  57. package/src/layout-primitives/switcher/README.md +0 -73
  58. package/src/layout-primitives/switcher/stories/index.stories.jsx +0 -50
  59. package/src/layout-primitives/text/README.md +0 -139
  60. package/src/layout-primitives/text/stories/index.stories.jsx +0 -148
  61. package/src/layout-primitives/vertical-writing/README.md +0 -133
  62. package/src/layout-primitives/vertical-writing/stories/index.stories.jsx +0 -104
  63. package/src/layout-primitives/with-sidebar/README.md +0 -169
  64. package/src/layout-primitives/with-sidebar/stories/index.stories.jsx +0 -124
  65. package/src/patterns/features/features-1/Features1.jsx +0 -54
  66. package/src/patterns/features/features-1/stories/index.stories.jsx +0 -68
  67. package/src/patterns/features/features-2/Features2.jsx +0 -28
  68. package/src/patterns/features/features-2/stories/index.stories.jsx +0 -67
  69. package/src/patterns/header/header-1/Header1.jsx +0 -34
  70. package/src/patterns/header/header-1/stories/index.stories.jsx +0 -44
  71. package/src/patterns/header/header-2/Header2.jsx +0 -28
  72. package/src/patterns/header/header-2/stories/index.stories.jsx +0 -44
  73. package/src/patterns/header/header-3/Header3.jsx +0 -25
  74. package/src/patterns/header/header-3/stories/index.stories.jsx +0 -43
  75. package/src/patterns/header/header-4/Header4.jsx +0 -28
  76. package/src/patterns/header/header-4/stories/index.stories.jsx +0 -41
  77. package/src/patterns/header/header-5/Header5.jsx +0 -35
  78. package/src/patterns/header/header-5/stories/index.stories.jsx +0 -43
  79. package/src/patterns/header/header-6/Header6.jsx +0 -37
  80. package/src/patterns/header/header-6/stories/index.stories.jsx +0 -58
  81. package/src/patterns/media-text/media-text-1/MediaText1.jsx +0 -44
  82. package/src/patterns/media-text/media-text-1/stories/index.stories.jsx +0 -34
  83. package/src/patterns/media-text/media-text-2/MediaText2.jsx +0 -42
  84. package/src/patterns/media-text/media-text-2/stories/index.stories.jsx +0 -34
  85. package/src/stories/1.introduction.stories.mdx +0 -60
  86. package/src/stories/2.get-started.stories.mdx +0 -49
  87. package/src/stories/3.global-api.stories.mdx +0 -61
  88. package/src/stories/4.global-css-variables.stories.mdx +0 -198
  89. package/src/storybook.scss +0 -10
@@ -1,169 +0,0 @@
1
- # With sidebar
2
-
3
- Assemble the component with sidebars. If the configured width can no longer be maintained, a single column display will be used.
4
-
5
- ## Usage
6
-
7
- ### HTML
8
-
9
- ```html
10
- <div data-unitone-layout="with-sidebar">
11
- <p>Lorem ipsum dolor sit amet</p>
12
- <ul>
13
- <li>Lorem</li>
14
- <li>ipsum</li>
15
- <li>dolor</li>
16
- </ul>
17
- </div>
18
- ```
19
-
20
- ### JSX
21
-
22
- ```jsx
23
- import { WithSidebar } from '@inc2734/unitone-css';
24
-
25
- <WithSidebar>
26
- <p>Lorem ipsum dolor sit amet</p>
27
- <ul>
28
- <li>Lorem</li>
29
- <li>ipsum</li>
30
- <li>dolor</li>
31
- </ul>
32
- </WithSidebar>
33
- ```
34
-
35
- ## Props
36
-
37
- ### Sidebar
38
-
39
- Sets sidebar position. Default is `right`.
40
-
41
- left / right
42
-
43
- #### HTML
44
-
45
- ```html
46
- <div data-unitone-layout="with-sidebar -sidebar:left">
47
- ...
48
- </div>
49
- ```
50
-
51
- #### JSX
52
-
53
- ```jsx
54
- import { WithSidebar } from '@inc2734/unitone-css';
55
-
56
- <WithSidebar sidebar="left">
57
- ...
58
- </WithSidebar>
59
- ```
60
-
61
- ### Revert
62
-
63
- The way child elements are displayed is reversed.
64
-
65
- #### HTML
66
-
67
- ```html
68
- <div data-unitone-layout="with-sidebar -revert">
69
- ...
70
- </div>
71
- ```
72
-
73
- #### JSX
74
-
75
- ```jsx
76
- import { WithSidebar } from '@inc2734/unitone-css';
77
-
78
- <WithSidebar revert>
79
- ...
80
- </WithSidebar>
81
- ```
82
-
83
- ### Content min width
84
-
85
- Min width of the content.
86
-
87
- #### HTML
88
-
89
- ```html
90
- <div data-unitone-layout="with-sidebar" style="--unitone--content-min-width: 500px">
91
- ...
92
- </div>
93
- ```
94
-
95
- #### JSX
96
-
97
- ```jsx
98
- import { WithSidebar } from '@inc2734/unitone-css';
99
-
100
- <WithSidebar contentMinWidth="500px">
101
- ...
102
- </WithSidebar>
103
- ```
104
-
105
- ### Sidebar width
106
-
107
- Sidebar width.
108
-
109
- #### HTML
110
-
111
- ```html
112
- <div data-unitone-layout="with-sidebar" style="--unitone--sidebar-width: 300px">
113
- ...
114
- </div>
115
- ```
116
-
117
- #### JSX
118
-
119
- ```jsx
120
- import { WithSidebar } from '@inc2734/unitone-css';
121
-
122
- <WithSidebar sidebarWidth="300px">
123
- ...
124
- </WithSidebar>
125
- ```
126
-
127
- ### Gap
128
-
129
- Gap.
130
-
131
- #### HTML
132
-
133
- ```html
134
- <ul data-unitone-layout="with-slider -gap:1">
135
- ...
136
- </ul>
137
- ```
138
-
139
- #### JSX
140
-
141
- ```jsx
142
- import { WithSidebar } from '@inc2734/unitone-css';
143
-
144
- <WithSidebar gap={1}>
145
- ...
146
- </WithSidebar>
147
- ```
148
-
149
- ### Align items
150
-
151
- Alignment of the row direction.
152
-
153
- #### HTML
154
-
155
- ```html
156
- <ul data-unitone-layout="with-slider -align-items:center">
157
- ...
158
- </ul>
159
- ```
160
-
161
- #### JSX
162
-
163
- ```jsx
164
- import { WithSidebar } from '@inc2734/unitone-css';
165
-
166
- <WithSidebar alignItems="center">
167
- ...
168
- </WithSidebar>
169
- ```
@@ -1,124 +0,0 @@
1
- import React from 'react';
2
- import readme from '../README.md';
3
-
4
- import { WithSidebar } from '../';
5
-
6
- export default {
7
- title: 'Layout Primitives/WithSidebar',
8
- component: WithSidebar,
9
- parameters: {
10
- notes: { readme },
11
- },
12
- argTypes: {
13
- alignItems: {
14
- control: { type: 'inline-radio' },
15
- description: '`--unitone--align-items`',
16
- description:
17
- 'Alignment of the row direction. Set by CSS var `--unitone--align-items` or `data-unitone-layout` attribute `-align-items:x`.',
18
- options: [undefined, 'start', 'center', 'end'],
19
- table: { defaultValue: { summary: undefined } },
20
- type: { name: 'string', required: false },
21
- },
22
- contentMinWidth: {
23
- control: { type: 'text' },
24
- description: 'Min width of the content. Set by CSS var `--unitone--content-min-width`.',
25
- table: { defaultValue: { summary: '50%' } },
26
- type: { name: 'string', required: false },
27
- },
28
- gap: {
29
- control: { type: 'inline-radio' },
30
- description:
31
- 'Gap. Set by CSS var `--unitone--gap` or `data-unitone-layout` attribute `-gap:x`.',
32
- options: [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7],
33
- table: { defaultValue: { summary: 'var(--unitone--global--gap)' } },
34
- type: { name: 'number', required: false },
35
- },
36
- revert: {
37
- control: { type: 'inline-radio' },
38
- description:
39
- 'The way child elements are displayed is reversed. Set by `data-unitone-layout` attribute `-revert`.',
40
- options: [false, true],
41
- table: { defaultValue: { summary: 'false' } },
42
- type: { name: 'boolean', required: false },
43
- },
44
- sidebar: {
45
- control: { type: 'inline-radio' },
46
- description:
47
- 'Which sidebar should be treated as a sidebar, right or left? Set by `data-unitone-layout` attribute `-sidebar:x`.',
48
- options: ['left', 'right'],
49
- table: { defaultValue: { summary: 'right' } },
50
- type: { name: 'string', required: false },
51
- },
52
- sidebarWidth: {
53
- control: { type: 'text' },
54
- description: 'Sidebar width. Set by CSS var `--unitone--sidebar-width`.',
55
- table: { defaultValue: { summary: 'initial' } },
56
- type: { name: 'string', required: false },
57
- },
58
- },
59
- args: {
60
- alignItems: undefined,
61
- contentMinWidth: '50%',
62
- gap: 2,
63
- revert: false,
64
- sidebar: 'right',
65
- sidebarWidth: 'initial',
66
- },
67
- };
68
-
69
- export const Default = (args) => {
70
- return (
71
- <WithSidebar {...args}>
72
- <p>Lorem ipsum dolor sit amet</p>
73
- <ul>
74
- <li>Lorem</li>
75
- <li>ipsum</li>
76
- <li>dolor</li>
77
- </ul>
78
- </WithSidebar>
79
- );
80
- };
81
-
82
- export const Revert = (args) => {
83
- return (
84
- <WithSidebar {...args}>
85
- <p>Lorem ipsum dolor sit amet</p>
86
- <ul>
87
- <li>Lorem</li>
88
- <li>ipsum</li>
89
- <li>dolor</li>
90
- </ul>
91
- </WithSidebar>
92
- );
93
- };
94
- Revert.storyName = 'Example : Revert';
95
- Revert.args = {
96
- revert: true,
97
- };
98
-
99
- export const Input = (args) => {
100
- return (
101
- <WithSidebar {...args}>
102
- <input type="text" />
103
- <button>Button</button>
104
- </WithSidebar>
105
- );
106
- };
107
- Input.storyName = 'Example : Input';
108
- Input.args = {
109
- gap: -2,
110
- };
111
-
112
- export const MediaText = (args) => {
113
- return (
114
- <WithSidebar {...args}>
115
- <img src="https://placehold.jp/400x300.jpg" alt="" />
116
- <p>Lorem ipsum dolor sit amet</p>
117
- </WithSidebar>
118
- );
119
- };
120
- MediaText.storyName = 'Example : Media and text';
121
- MediaText.args = {
122
- sidebar: 'left',
123
- sidebarWidth: '300px',
124
- };
@@ -1,54 +0,0 @@
1
- import React from 'react';
2
-
3
- import {
4
- Decorator,
5
- Center,
6
- Container,
7
- ResponsiveGrid,
8
- Gutters,
9
- Stack,
10
- Text,
11
- } from '@inc2734/unitone-css';
12
-
13
- export const Feature1 = ({ items = [], ...props }) => (
14
- <Decorator backgroundColor={props.backgroundColor} color={props.color}>
15
- <Gutters>
16
- <Container>
17
- <Stack gap={props.gap}>
18
- {!!props.title && (
19
- <Center>
20
- <h2 style={{ '--unitone--font-size': 3 }}>{props.title}</h2>
21
- </Center>
22
- )}
23
- {0 < items.length && (
24
- <ResponsiveGrid columnMinWidth={props.columnMinWidth} gap={props.gap}>
25
- {items.map((item, index) => (
26
- <Stack key={index} gap={-1}>
27
- {(!!item.src || !!item.title) && (
28
- <Stack gap={-2}>
29
- {!!item.src && (
30
- <Center>
31
- <img src={item.src} alt="" />
32
- </Center>
33
- )}
34
- {!!item.title && (
35
- <Center>
36
- <h3 style={{ '--unitone--font-size': 1 }}>{item.title}</h3>
37
- </Center>
38
- )}
39
- </Stack>
40
- )}
41
- {!!item.content && (
42
- <Text style={{ '--unitone--font-size': -1 }}>
43
- <p>{item.content}</p>
44
- </Text>
45
- )}
46
- </Stack>
47
- ))}
48
- </ResponsiveGrid>
49
- )}
50
- </Stack>
51
- </Container>
52
- </Gutters>
53
- </Decorator>
54
- );
@@ -1,68 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Feature1 } from '../Features1';
4
-
5
- export default {
6
- title: 'Patterns/Features/Features-1',
7
- component: Feature1,
8
- argTypes: {
9
- backgroundColor: {
10
- control: { type: 'color' },
11
- table: { defaultValue: { summary: 'transparent' } },
12
- type: { name: 'string', required: false },
13
- },
14
- columnMinWidth: {
15
- control: { type: 'text' },
16
- description: '`--unitone--column-min-width`',
17
- table: { defaultValue: { summary: '240px' } },
18
- type: { name: 'string', required: false },
19
- },
20
- color: {
21
- control: { type: 'color' },
22
- table: { defaultValue: { summary: 'initial' } },
23
- type: { name: 'string', required: false },
24
- },
25
- gap: {
26
- control: { type: 'inline-radio' },
27
- options: [1, 2, 3, 4],
28
- table: { defaultValue: { summary: 2 } },
29
- type: { name: 'number', required: false },
30
- },
31
- },
32
- args: {
33
- backgroundColor: 'transparent',
34
- columnMinWidth: '240px',
35
- color: 'initial',
36
- gap: 2,
37
- },
38
- parameters: {
39
- layout: 'fullscreen',
40
- },
41
- };
42
-
43
- export const Default = (props) => (
44
- <Feature1
45
- backgroundColor={props.backgroundColor}
46
- columnMinWidth={props.columnMinWidth}
47
- color={props.color}
48
- gap={props.gap}
49
- title="Lorem ipsum dolor sit amet"
50
- items={[
51
- {
52
- title: 'Lorem',
53
- src: 'https://placehold.jp/600x800.jpg',
54
- content: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit',
55
- },
56
- {
57
- title: 'ipsum',
58
- src: 'https://placehold.jp/600x800.jpg',
59
- content: 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua',
60
- },
61
- {
62
- title: 'dolor',
63
- src: 'https://placehold.jp/600x800.jpg',
64
- content: 'Ut enim ad minim veniam',
65
- },
66
- ]}
67
- />
68
- );
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Decorator, Container, Frame, Layers, ResponsiveGrid, Gutters } from '@inc2734/unitone-css';
4
-
5
- export const Feature2 = ({ items = [], ...props }) => (
6
- <Decorator backgroundColor={props.backgroundColor} color={props.color}>
7
- <Gutters>
8
- <Container>
9
- {0 < items.length && (
10
- <ResponsiveGrid columnMinWidth={props.columnMinWidth} gap={props.gap}>
11
- {items.map((item, index) => (
12
- <Layers key={index}>
13
- <Frame ratio="3/4">{!!item.src && <img src={item.src} alt="" />}</Frame>
14
- {!!item.content && (
15
- <div style={{ '--unitone--font-size': -1, '--unitone--align-self': 'end' }}>
16
- <Decorator padding={1}>
17
- <p>{item.content}</p>
18
- </Decorator>
19
- </div>
20
- )}
21
- </Layers>
22
- ))}
23
- </ResponsiveGrid>
24
- )}
25
- </Container>
26
- </Gutters>
27
- </Decorator>
28
- );
@@ -1,67 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Feature2 } from '../Features2';
4
-
5
- export default {
6
- title: 'Patterns/Features/Features-2',
7
- component: Feature2,
8
- argTypes: {
9
- backgroundColor: {
10
- control: { type: 'color' },
11
- table: { defaultValue: { summary: 'transparent' } },
12
- type: { name: 'string', required: false },
13
- },
14
- columnMinWidth: {
15
- control: { type: 'text' },
16
- description: '`--unitone--column-min-width`',
17
- table: { defaultValue: { summary: '240px' } },
18
- type: { name: 'string', required: false },
19
- },
20
- color: {
21
- control: { type: 'color' },
22
- table: { defaultValue: { summary: '#fff' } },
23
- type: { name: 'string', required: false },
24
- },
25
- gap: {
26
- control: { type: 'inline-radio' },
27
- options: [0, 1, 2, 3, 4],
28
- table: { defaultValue: { summary: 0 } },
29
- type: { name: 'number', required: false },
30
- },
31
- },
32
- args: {
33
- backgroundColor: 'transparent',
34
- columnMinWidth: '240px',
35
- color: '#fff',
36
- gap: 0,
37
- },
38
- parameters: {
39
- layout: 'fullscreen',
40
- },
41
- };
42
-
43
- export const Default = (props) => (
44
- <Feature2
45
- backgroundColor={props.backgroundColor}
46
- columnMinWidth={props.columnMinWidth}
47
- color={props.color}
48
- gap={props.gap}
49
- items={[
50
- {
51
- title: 'Lorem',
52
- src: 'https://placehold.jp/600x800.jpg',
53
- content: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit',
54
- },
55
- {
56
- title: 'ipsum',
57
- src: 'https://placehold.jp/600x800.jpg',
58
- content: 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua',
59
- },
60
- {
61
- title: 'dolor',
62
- src: 'https://placehold.jp/600x800.jpg',
63
- content: 'Ut enim ad minim veniam',
64
- },
65
- ]}
66
- />
67
- );
@@ -1,34 +0,0 @@
1
- import React from 'react';
2
-
3
- import {
4
- Decorator,
5
- Center,
6
- Container,
7
- Cover,
8
- CoverContent,
9
- Layers,
10
- Stack,
11
- Text,
12
- } from '@inc2734/unitone-css';
13
-
14
- export const Header1 = (props) => (
15
- <Decorator backgroundColor={props.backgroundColor} color={props.color}>
16
- <Layers cover>
17
- {!!props.src && <img src={props.src} alt="" />}
18
- <Cover>
19
- <CoverContent>
20
- <Container gutters={0} maxWidth="var(--unitone--measure)">
21
- <Stack gap={2}>
22
- {!!props.title && (
23
- <Center>
24
- <h2 style={{ '--unitone--font-size': 5 }}>{props.title}</h2>
25
- </Center>
26
- )}
27
- {!!props.children && <Text center>{props.children}</Text>}
28
- </Stack>
29
- </Container>
30
- </CoverContent>
31
- </Cover>
32
- </Layers>
33
- </Decorator>
34
- );
@@ -1,44 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Header1 } from '../Header1';
4
-
5
- export default {
6
- title: 'Patterns/Header/Header-1',
7
- component: Header1,
8
- argTypes: {
9
- backgroundColor: {
10
- control: { type: 'color' },
11
- table: { defaultValue: { summary: 'transparent' } },
12
- type: { name: 'string', required: false },
13
- },
14
- color: {
15
- control: { type: 'color' },
16
- table: { defaultValue: { summary: '#fff' } },
17
- type: { name: 'string', required: false },
18
- },
19
- },
20
- args: {
21
- backgroundColor: 'transparent',
22
- color: '#fff',
23
- },
24
- parameters: {
25
- layout: 'fullscreen',
26
- },
27
- };
28
-
29
- export const Default = (props) => (
30
- <Header1
31
- src="https://placehold.jp/1280x1024.jpg"
32
- title="Lorem ipsum dolor"
33
- backgroundColor={props.backgroundColor}
34
- color={props.color}
35
- >
36
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
37
- <p>
38
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
39
- labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
40
- laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
41
- voluptate velit esse cill
42
- </p>
43
- </Header1>
44
- );
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Decorator, Center, Container, Gutters, Stack, Text } from '@inc2734/unitone-css';
4
-
5
- export const Header2 = (props) => (
6
- <Decorator backgroundColor={props.backgroundColor} color={props.color}>
7
- <Gutters style={{ paddingBottom: 0 }}>
8
- <Stack gap={2}>
9
- <Container>
10
- <Stack gap={2}>
11
- {!!props.title && (
12
- <Center>
13
- <h2 style={{ '--unitone--font-size': 5 }}>{props.title}</h2>
14
- </Center>
15
- )}
16
- {!!props.children && <Text center>{props.children}</Text>}
17
- </Stack>
18
- </Container>
19
-
20
- {!!props.src && (
21
- <Center>
22
- <img src={props.src} alt="" style={{ marginBottom: 0 }} />
23
- </Center>
24
- )}
25
- </Stack>
26
- </Gutters>
27
- </Decorator>
28
- );
@@ -1,44 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Header2 } from '../Header2';
4
-
5
- export default {
6
- title: 'Patterns/Header/Header-2',
7
- component: Header2,
8
- argTypes: {
9
- backgroundColor: {
10
- control: { type: 'color' },
11
- table: { defaultValue: { summary: 'transparent' } },
12
- type: { name: 'string', required: false },
13
- },
14
- color: {
15
- control: { type: 'color' },
16
- table: { defaultValue: { summary: 'initial' } },
17
- type: { name: 'string', required: false },
18
- },
19
- },
20
- args: {
21
- backgroundColor: 'transparent',
22
- color: 'initial',
23
- },
24
- parameters: {
25
- layout: 'fullscreen',
26
- },
27
- };
28
-
29
- export const Default = (props) => (
30
- <Header2
31
- src="https://placehold.jp/1280x480.jpg"
32
- title="Lorem ipsum dolor"
33
- backgroundColor={props.backgroundColor}
34
- color={props.color}
35
- >
36
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
37
- <p>
38
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
39
- labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
40
- laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
41
- voluptate velit esse cill
42
- </p>
43
- </Header2>
44
- );
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Decorator, Center, Container, Gutters, Stack, Text } from '@inc2734/unitone-css';
4
-
5
- export const Header3 = (props) => (
6
- <Decorator backgroundColor={props.backgroundColor} color={props.color}>
7
- <Gutters>
8
- <Container>
9
- <Stack gap={2}>
10
- <Container align="start" gutters={0} maxWidth="var(--unitone--measure)">
11
- <Stack gap={2}>
12
- {!!props.title && <h2 style={{ '--unitone--font-size': 3 }}>{props.title}</h2>}
13
- {!!props.children && <Text>{props.children}</Text>}
14
- </Stack>
15
- </Container>
16
- {!!props.src && (
17
- <Center>
18
- <img src={props.src} alt="" />
19
- </Center>
20
- )}
21
- </Stack>
22
- </Container>
23
- </Gutters>
24
- </Decorator>
25
- );