Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 24 additions & 16 deletions elements/rh-cta/rh-cta.story.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
import { storiesOf } from "@storybook/polymer";
import { withKnobs, text, select } from "@storybook/addon-knobs/polymer";
import "./rh-cta";

storiesOf("Call To Action", module).add(
"rh-cta",
() => `
<p>
<rh-cta class="solid"><a href="#">Become a Member</a></rh-cta>
<rh-cta class="outlined"><a href="#">Sign Up</a></rh-cta>
<rh-cta class="ghost"><a href="#">More info</a></rh-cta>
</p>
const stories = storiesOf("Call To Action", module);
stories.addDecorator(withKnobs);

<p>
<rh-cta><a href="#">Learn more</a></rh-cta>
</p>
stories.add("rh-cta", () => {
const type = "Type";
const options = {
solid: "Solid",
outlined: "Outlined",
ghost: "Ghost"
};

<p>
<rh-cta class="ghost"><a href="#">More info</a></rh-cta><rh-cta class="solid"><a href="#">Become a Member</a></rh-cta>
</p>
`
);
const defaultValue = "Solid";

const value = select(type, options, defaultValue);

return `
<p>
<rh-cta><a href="#">Become a Member</a></rh-cta>
</p>
<p>
<rh-cta class="rh--${value}"><a href="#">Become a Member</a></rh-cta>
</p>

`;
});