1-Button.stories.js 480 Bytes
Newer Older
zhanghaozhe committed
1
import React from "react"
zhanghaozhe committed
2

zhanghaozhe committed
3 4
import { action } from "@storybook/addon-actions"
import { Button } from "@storybook/react/demo"
zhanghaozhe committed
5 6

export default {
zhanghaozhe committed
7
  title: "Button",
zhanghaozhe committed
8
  component: Button,
zhanghaozhe committed
9
}
zhanghaozhe committed
10

zhanghaozhe committed
11 12 13
export const Text = () => (
  <Button onClick={action("clicked")}>Hello Button</Button>
)
zhanghaozhe committed
14 15

export const Emoji = () => (
zhanghaozhe committed
16
  <Button onClick={action("clicked")}>
zhanghaozhe committed
17 18 19 20
    <span role="img" aria-label="so cool">
      😀 😎 👍 💯
    </span>
  </Button>
zhanghaozhe committed
21
)
zhanghaozhe committed
22 23

Emoji.story = {
zhanghaozhe committed
24 25
  name: "with emoji",
}