forked from chromaui/learnstorybook.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CTA.stories.js
31 lines (25 loc) · 718 Bytes
/
CTA.stories.js
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
import React from 'react';
import styled from 'styled-components';
import { Button, styles } from '@storybook/design-system';
import CTA from './CTA';
const Wrapper = styled.div`
padding: 40px 0;
@media (min-width: ${styles.breakpoint + 1}px) {
padding: 40px;
}
`;
const ctaAction = <Button appearance="secondary">Get started</Button>;
export default {
component: CTA,
title: 'Composite/CTA',
decorators: [story => <Wrapper>{story()}</Wrapper>],
};
export const All = () => (
<>
<CTA text="Get started with our thing today!" action={ctaAction} />
<CTA
text="Get started with our really long thing that will potentially break lines today!"
action={ctaAction}
/>
</>
);