From 4adb93bbc7ebcd6dc473af3c07803503947b3ddb Mon Sep 17 00:00:00 2001 From: Stephan <57194608+stephan418@users.noreply.github.com> Date: Mon, 13 Mar 2023 20:37:58 +0100 Subject: [PATCH] Add default exports and format radiobutton files --- src/components/radio/index.ts | 4 ++++ src/stories/RadioButtonGroup.stories.tsx | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 src/components/radio/index.ts diff --git a/src/components/radio/index.ts b/src/components/radio/index.ts new file mode 100644 index 0000000..ba897af --- /dev/null +++ b/src/components/radio/index.ts @@ -0,0 +1,4 @@ +import RadioButton from "./button/RadioButton"; +import RadioButtonGroup from "./group/RadioButtonGroup"; + +export default { RadioButton, RadioButtonGroup }; diff --git a/src/stories/RadioButtonGroup.stories.tsx b/src/stories/RadioButtonGroup.stories.tsx index 6de9179..1e48fd6 100644 --- a/src/stories/RadioButtonGroup.stories.tsx +++ b/src/stories/RadioButtonGroup.stories.tsx @@ -1,5 +1,4 @@ import React from "react"; - import { ComponentStory, ComponentMeta } from "@storybook/react"; import RadioButtonGroup from "../components/radio/group/RadioButtonGroup"; @@ -8,13 +7,15 @@ import RadioButton from "../components/radio/button/RadioButton"; export default { title: "Radio button group", component: RadioButtonGroup, - argTypes: { onSelection: { action: "select" }, value: {type: "string"} }, + argTypes: { onSelection: { action: "select" }, value: { type: "string" } }, } as ComponentMeta; -const Template: ComponentStory = (args) => +const Template: ComponentStory = (args) => ( + -; + +); export const DefaultInput = Template.bind({}); @@ -22,4 +23,4 @@ DefaultInput.args = { value: undefined, defaultValue: "two", disabled: false, -} +};