mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-19 05:02:40 +08:00
23 lines
702 B
Plaintext
23 lines
702 B
Plaintext
|
import React from "react";
|
||
|
import { action } from "@storybook/addon-actions";
|
||
|
import { Button } from "@storybook/react/demo";
|
||
|
|
||
|
export default {
|
||
|
title: "Button",
|
||
|
excludeStories: ["text"],
|
||
|
includeStories: /emoji.*/
|
||
|
};
|
||
|
|
||
|
export const Basic = () => (
|
||
|
<Button onClick={action("clicked")}>Hello Button</Button>
|
||
|
);
|
||
|
|
||
|
export const WithParams = () => <Button>WithParams</Button>;
|
||
|
WithParams.parameters = { foo: 'bar' }
|
||
|
|
||
|
export const WithDocsParams = () => <Button>WithDocsParams</Button>;
|
||
|
WithDocsParams.parameters = { docs: { iframeHeight: 200 } };
|
||
|
|
||
|
export const WithStorySourceParams = () => <Button>WithStorySourceParams</Button>;
|
||
|
WithStorySourceParams.parameters = { storySource: { source: 'foo' } };
|