-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f60026c
commit 660760e
Showing
8 changed files
with
39 additions
and
31 deletions.
There are no files selected for viewing
22 changes: 11 additions & 11 deletions
22
app/components/CheckboxRow/index.stories.tsx → ...omponents/CheckboxLabel/index.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
import { CheckboxRow } from "."; | ||
import { Checkbox } from "~/components/Checkbox"; | ||
import { Label } from "~/components/Label"; | ||
import { CheckboxLabel } from "."; | ||
|
||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { Checkbox } from "~/components/Checkbox"; | ||
|
||
const meta = { | ||
component: CheckboxRow, | ||
} satisfies Meta<typeof CheckboxRow>; | ||
component: CheckboxLabel, | ||
} satisfies Meta<typeof CheckboxLabel>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Checked: Story = { | ||
render: (args) => ( | ||
<form> | ||
<CheckboxRow {...args}> | ||
<CheckboxLabel {...args}> | ||
<Checkbox | ||
id="alwaysGameNames" | ||
name="alwaysGameNames" | ||
defaultChecked={true} | ||
/> | ||
<Label htmlFor="alwaysGameNames">Always show game names</Label> | ||
</CheckboxRow> | ||
Always show game names | ||
</CheckboxLabel> | ||
</form> | ||
), | ||
}; | ||
|
||
export const Unchecked: Story = { | ||
render: (args) => ( | ||
<form> | ||
<CheckboxRow {...args}> | ||
<CheckboxLabel {...args}> | ||
<Checkbox | ||
id="alwaysGameNames" | ||
name="alwaysGameNames" | ||
defaultChecked={false} | ||
/> | ||
<Label htmlFor="alwaysGameNames">Always show game names</Label> | ||
</CheckboxRow> | ||
Always show game names | ||
</CheckboxLabel> | ||
</form> | ||
), | ||
}; |
14 changes: 10 additions & 4 deletions
14
app/components/CheckboxRow/index.tsx → app/components/CheckboxLabel/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters