Skip to content

Commit ac4a89b

Browse files
TylerMartin5kylebuch8
authored andcommitted
test pr and add cta type select box (#102)
* test pr and add cta type select box * remove groupID
1 parent 00cfbf3 commit ac4a89b

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

elements/rh-cta/rh-cta.story.js

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
import { storiesOf } from "@storybook/polymer";
2+
import { withKnobs, text, select } from "@storybook/addon-knobs/polymer";
23
import "./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+
});

0 commit comments

Comments
 (0)