File tree Expand file tree Collapse file tree 1 file changed +24
-16
lines changed
Expand file tree Collapse file tree 1 file changed +24
-16
lines changed Original file line number Diff line number Diff line change 11import { storiesOf } from "@storybook/polymer" ;
2+ import { withKnobs , text , select } from "@storybook/addon-knobs/polymer" ;
23import "./rh-cta" ;
34
4- storiesOf ( "Call To Action" , module ) . add (
5- "rh-cta" ,
6- ( ) => `
7- <p>
8- <rh-cta class="solid"><a href="#">Become a Member</a></rh-cta>
9- <rh-cta class="outlined"><a href="#">Sign Up</a></rh-cta>
10- <rh-cta class="ghost"><a href="#">More info</a></rh-cta>
11- </p>
5+ const stories = storiesOf ( "Call To Action" , module ) ;
6+ stories . addDecorator ( withKnobs ) ;
127
13- <p>
14- <rh-cta><a href="#">Learn more</a></rh-cta>
15- </p>
8+ stories . add ( "rh-cta" , ( ) => {
9+ const type = "Type" ;
10+ const options = {
11+ solid : "Solid" ,
12+ outlined : "Outlined" ,
13+ ghost : "Ghost"
14+ } ;
1615
17- <p>
18- <rh-cta class="ghost"><a href="#">More info</a></rh-cta><rh-cta class="solid"><a href="#">Become a Member</a></rh-cta>
19- </p>
20- `
21- ) ;
16+ const defaultValue = "Solid" ;
17+
18+ const value = select ( type , options , defaultValue ) ;
19+
20+ return `
21+ <p>
22+ <rh-cta><a href="#">Become a Member</a></rh-cta>
23+ </p>
24+ <p>
25+ <rh-cta class="rh--${ value } "><a href="#">Become a Member</a></rh-cta>
26+ </p>
27+
28+ ` ;
29+ } ) ;
You can’t perform that action at this time.
0 commit comments