prices.stories.tsx 541 Bytes
Newer Older
zhanghaozhe committed
1 2 3
import React from "react"
import Prices from "./index"
import { withKnobs, number } from "@storybook/addon-knobs"
zhanghaozhe committed
4 5

export default {
zhanghaozhe committed
6 7 8 9 10 11 12 13 14 15
  title: "prices",
  component: Prices,
  decorators: [
    withKnobs,
    (story: () => React.ReactNode) => (
      <div className={"shadow"} style={{ width: "100px", padding: "10px" }}>
        {story()}
      </div>
    ),
  ],
zhanghaozhe committed
16 17 18
}

export const Default = () => {
zhanghaozhe committed
19 20 21 22
  const current = number("current", 100)
  const origin = number("origin", 1000)
  return <Prices current={current} origin={origin}></Prices>
}