-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathCSF.tsx
More file actions
66 lines (61 loc) · 2.02 KB
/
CSF.tsx
File metadata and controls
66 lines (61 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import React from 'react';
import styled from 'styled-components';
import { Link, styles } from '@storybook/design-system';
import { Card, CardMedia, CardBody } from '../../components/Card';
import { Text } from '../../components/Text';
import { CheckList, CheckListItem } from '../../components/CheckList';
import { Stack } from '../../components/Stack';
const CSFLogo = styled(CardMedia)`
background-color: ${styles.color.green};
`;
const CSFDescription = styled(CardBody)`
padding-top: 40px;
padding-right: 20px;
padding-bottom: 40px;
padding-left: 20px;
@media (min-width: ${styles.breakpoint * 1}px) {
padding-right: 40px;
padding-left: 40px;
}
@media (min-width: ${styles.breakpoint * 1.75}px) {
padding-top: 52px;
padding-right: 24px;
padding-bottom: 60px;
padding-left: 70px;
}
`;
export const CSF = () => (
<Card>
<CSFLogo>
<img src="/logos/logo-csf.svg" alt="" />
</CSFLogo>
<CSFDescription>
<Stack axis="vertical" space={24}>
<Text>
The{' '}
<Link href="https://storybook.js.org/docs/api/csf/index">
Component Story Format
</Link>{' '}
is an open standard for component examples based on JavaScript ES6
modules. This enables interoperation between development, testing, and
design tools.
</Text>
<CheckList>
<CheckListItem type="check">
<b>Simple:</b> Writing component “stories” is as easy as exporting
ES6 functions using a clean, widely-used format.
</CheckListItem>
<CheckListItem type="check">
<b>Non-proprietary:</b> CSF doesn’t require any vendor-specific
libraries.
</CheckListItem>
<CheckListItem type="check">
<b>Declarative:</b> The declarative syntax is isomorphic to
higher-level formats like MDX, enabling clean, verifiable
transformations.
</CheckListItem>
</CheckList>
</Stack>
</CSFDescription>
</Card>
);