@inc2734/unitone-css 0.47.3 → 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 (77) 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/center/_center.scss +1 -6
  9. package/src/layout-primitives/center/index.jsx +1 -1
  10. package/src/layout-primitives/cover/_cover.scss +1 -0
  11. package/src/layout-primitives/float/_float.scss +4 -4
  12. package/src/layout-primitives/float/index.jsx +1 -1
  13. package/src/layout-primitives/layers/_layers.scss +21 -8
  14. package/src/layout-primitives/layers/index.jsx +4 -2
  15. package/src/layout-primitives/text/index.jsx +2 -1
  16. package/src/layout-primitives/vertical-writing/index.jsx +3 -1
  17. package/src/library.js +2 -1
  18. package/dist/storybook.css +0 -1
  19. package/src/layout-primitives/both-sides/README.md +0 -143
  20. package/src/layout-primitives/both-sides/stories/index.stories.jsx +0 -49
  21. package/src/layout-primitives/center/README.md +0 -113
  22. package/src/layout-primitives/center/stories/index.stories.jsx +0 -63
  23. package/src/layout-primitives/cluster/README.md +0 -133
  24. package/src/layout-primitives/cluster/stories/index.stories.jsx +0 -135
  25. package/src/layout-primitives/container/README.md +0 -93
  26. package/src/layout-primitives/container/stories/index.stories.jsx +0 -65
  27. package/src/layout-primitives/cover/README.md +0 -195
  28. package/src/layout-primitives/cover/stories/index.stories.jsx +0 -179
  29. package/src/layout-primitives/decorator/README.md +0 -179
  30. package/src/layout-primitives/decorator/stories/index.stories.jsx +0 -198
  31. package/src/layout-primitives/float/README.md +0 -115
  32. package/src/layout-primitives/float/stories/index.stories.jsx +0 -78
  33. package/src/layout-primitives/frame/README.md +0 -67
  34. package/src/layout-primitives/frame/stories/index.stories.jsx +0 -50
  35. package/src/layout-primitives/gutters/README.md +0 -47
  36. package/src/layout-primitives/gutters/stories/index.stories.jsx +0 -48
  37. package/src/layout-primitives/layers/README.md +0 -307
  38. package/src/layout-primitives/layers/stories/index.stories.jsx +0 -187
  39. package/src/layout-primitives/reel/README.md +0 -115
  40. package/src/layout-primitives/reel/stories/index.stories.jsx +0 -80
  41. package/src/layout-primitives/responsive-grid/README.md +0 -130
  42. package/src/layout-primitives/responsive-grid/stories/index.stories.jsx +0 -234
  43. package/src/layout-primitives/stack/README.md +0 -98
  44. package/src/layout-primitives/stack/stories/index.stories.jsx +0 -193
  45. package/src/layout-primitives/switcher/README.md +0 -73
  46. package/src/layout-primitives/switcher/stories/index.stories.jsx +0 -50
  47. package/src/layout-primitives/text/README.md +0 -139
  48. package/src/layout-primitives/text/stories/index.stories.jsx +0 -148
  49. package/src/layout-primitives/vertical-writing/README.md +0 -133
  50. package/src/layout-primitives/vertical-writing/stories/index.stories.jsx +0 -104
  51. package/src/layout-primitives/with-sidebar/README.md +0 -169
  52. package/src/layout-primitives/with-sidebar/stories/index.stories.jsx +0 -124
  53. package/src/patterns/features/features-1/Features1.jsx +0 -54
  54. package/src/patterns/features/features-1/stories/index.stories.jsx +0 -68
  55. package/src/patterns/features/features-2/Features2.jsx +0 -28
  56. package/src/patterns/features/features-2/stories/index.stories.jsx +0 -67
  57. package/src/patterns/header/header-1/Header1.jsx +0 -34
  58. package/src/patterns/header/header-1/stories/index.stories.jsx +0 -44
  59. package/src/patterns/header/header-2/Header2.jsx +0 -28
  60. package/src/patterns/header/header-2/stories/index.stories.jsx +0 -44
  61. package/src/patterns/header/header-3/Header3.jsx +0 -25
  62. package/src/patterns/header/header-3/stories/index.stories.jsx +0 -43
  63. package/src/patterns/header/header-4/Header4.jsx +0 -28
  64. package/src/patterns/header/header-4/stories/index.stories.jsx +0 -41
  65. package/src/patterns/header/header-5/Header5.jsx +0 -35
  66. package/src/patterns/header/header-5/stories/index.stories.jsx +0 -43
  67. package/src/patterns/header/header-6/Header6.jsx +0 -37
  68. package/src/patterns/header/header-6/stories/index.stories.jsx +0 -58
  69. package/src/patterns/media-text/media-text-1/MediaText1.jsx +0 -44
  70. package/src/patterns/media-text/media-text-1/stories/index.stories.jsx +0 -34
  71. package/src/patterns/media-text/media-text-2/MediaText2.jsx +0 -42
  72. package/src/patterns/media-text/media-text-2/stories/index.stories.jsx +0 -34
  73. package/src/stories/1.introduction.stories.mdx +0 -60
  74. package/src/stories/2.get-started.stories.mdx +0 -49
  75. package/src/stories/3.global-api.stories.mdx +0 -61
  76. package/src/stories/4.global-css-variables.stories.mdx +0 -198
  77. package/src/storybook.scss +0 -10
@@ -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
- );
@@ -1,43 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Header3 } from '../Header3';
4
-
5
- export default {
6
- title: 'Patterns/Header/Header-3',
7
- component: Header3,
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
- <Header3
31
- src="https://placehold.jp/1280x1024.jpg"
32
- title="Lorem ipsum dolor sit amet, consectetur adipisicing elit"
33
- backgroundColor={props.backgroundColor}
34
- color={props.color}
35
- >
36
- <p>
37
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
38
- labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
39
- laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
40
- voluptate velit esse cill
41
- </p>
42
- </Header3>
43
- );
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
-
3
- import {
4
- Decorator,
5
- Container,
6
- Cover,
7
- CoverContent,
8
- Layers,
9
- Stack,
10
- Text,
11
- } from '@inc2734/unitone-css';
12
-
13
- export const Header4 = (props) => (
14
- <Decorator backgroundColor={props.backgroundColor} color={props.color}>
15
- <Layers cover>
16
- {!!props.src && <img src={props.src} alt="" />}
17
- <Cover>
18
- <CoverContent></CoverContent>
19
- <Container align="start" gutters={0} maxWidth="var(--unitone--measure)">
20
- <Stack gap={2}>
21
- {!!props.title && <h2 style={{ '--unitone--font-size': 4 }}>{props.title}</h2>}
22
- {!!props.children && <Text>{props.children}</Text>}
23
- </Stack>
24
- </Container>
25
- </Cover>
26
- </Layers>
27
- </Decorator>
28
- );
@@ -1,41 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Header4 } from '../Header4';
4
-
5
- export default {
6
- title: 'Patterns/Header/Header-4',
7
- component: Header4,
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
- <Header4
31
- src="https://placehold.jp/1280x1024.jpg"
32
- title="Lorem ipsum dolor sit amet, consectetur adipisicing elit"
33
- backgroundColor={props.backgroundColor}
34
- color={props.color}
35
- >
36
- <p>
37
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
38
- labore et dolore magna aliqua.
39
- </p>
40
- </Header4>
41
- );
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
-
3
- import {
4
- Decorator,
5
- Container,
6
- Cover,
7
- CoverContent,
8
- Layers,
9
- Stack,
10
- Text,
11
- } from '@inc2734/unitone-css';
12
-
13
- export const Header5 = (props) => (
14
- <Decorator backgroundColor={props.backgroundColor} color={props.color}>
15
- <Layers cover>
16
- {!!props.src && (
17
- <img src={props.src} alt="" style={{ width: 'var(--unitone--pg10)', left: 'auto' }} />
18
- )}
19
- <Cover>
20
- <CoverContent>
21
- <Container align="start" gutters={0} maxWidth="var(--unitone--measure)">
22
- <Stack gap={2}>
23
- {!!props.title && (
24
- <Stack style={{ '--unitone--font-size': 5 }}>
25
- <h2>{props.title}</h2>
26
- </Stack>
27
- )}
28
- {!!props.children && <Text>{props.children}</Text>}
29
- </Stack>
30
- </Container>
31
- </CoverContent>
32
- </Cover>
33
- </Layers>
34
- </Decorator>
35
- );