mirror of
https://github.com/detleph/components.git
synced 2026-09-04 00:26:01 +02:00
Add default exports and format radiobutton files
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
import RadioButton from "./button/RadioButton";
|
||||
import RadioButtonGroup from "./group/RadioButtonGroup";
|
||||
|
||||
export default { RadioButton, RadioButtonGroup };
|
||||
@@ -1,5 +1,4 @@
|
||||
import React from "react";
|
||||
|
||||
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||
|
||||
import RadioButtonGroup from "../components/radio/group/RadioButtonGroup";
|
||||
@@ -11,10 +10,12 @@ export default {
|
||||
argTypes: { onSelection: { action: "select" }, value: { type: "string" } },
|
||||
} as ComponentMeta<typeof RadioButtonGroup>;
|
||||
|
||||
const Template: ComponentStory<typeof RadioButtonGroup> = (args) => <RadioButtonGroup {...args}>
|
||||
const Template: ComponentStory<typeof RadioButtonGroup> = (args) => (
|
||||
<RadioButtonGroup {...args}>
|
||||
<RadioButton value="one" label="First option" />
|
||||
<RadioButton value="two" label="Second option" />
|
||||
</RadioButtonGroup>;
|
||||
</RadioButtonGroup>
|
||||
);
|
||||
|
||||
export const DefaultInput = Template.bind({});
|
||||
|
||||
@@ -22,4 +23,4 @@ DefaultInput.args = {
|
||||
value: undefined,
|
||||
defaultValue: "two",
|
||||
disabled: false,
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user