mirror of
https://github.com/zhigang1992/bug-free-fiesta.git
synced 2026-01-12 22:38:24 +08:00
boom
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import {select, withKnobs} from "@storybook/addon-knobs";
|
||||
import AwesomeButton, {AwesomeButtonProps} from "./AwesomeButton";
|
||||
import { select, withKnobs } from "@storybook/addon-knobs";
|
||||
import AwesomeButton, { AwesomeButtonProps } from "./AwesomeButton";
|
||||
|
||||
export default {
|
||||
title: "AwesomeButton",
|
||||
@@ -9,27 +9,14 @@ export default {
|
||||
};
|
||||
|
||||
export const Single = () => {
|
||||
const type = select<AwesomeButtonProps['type']>(
|
||||
const type = select<AwesomeButtonProps["type"]>(
|
||||
"Type",
|
||||
['Awesome', 'Cool', 'Sup'],
|
||||
["Awesome", "Cool", "Sup"] as any,
|
||||
"Awesome"
|
||||
);
|
||||
return (
|
||||
<div className="flex">
|
||||
<AwesomeButton type={type}/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export const Multiple = () => {
|
||||
const type = select<AwesomeButtonProps['type']>(
|
||||
"Type",
|
||||
['Awesome', 'Cool', 'Sup'],
|
||||
"Cool"
|
||||
);
|
||||
return (
|
||||
<div className="flex">
|
||||
<AwesomeButton type={type}/>
|
||||
<AwesomeButton type={type} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user