-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Restructure components to live in their own separate folders (#72)
* feat: Restructure components to live in their own separate folders * Move checkbox docs to component dir * fix: use folder names in place of index.tsx * Update src/components/Checkbox/Checkbox.docs.mdx Co-authored-by: Chris Contolini <contolini@users.noreply.github.com> --------- Co-authored-by: Chris Contolini <contolini@users.noreply.github.com> Co-authored-by: James L <jlivolsi@teamraft.com> Co-authored-by: James Vincent <121906052+the-raft-oar@users.noreply.github.com>
- Loading branch information
1 parent
7d2ff92
commit 7b5beb4
Showing
60 changed files
with
438 additions
and
365 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
2 changes: 1 addition & 1 deletion
2
src/components/BannerLanguageLink.tsx → src/components/Banner/BannerLanguageLink.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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
4 changes: 2 additions & 2 deletions
4
src/components/DropdownPills.tsx → src/components/Dropdown/DropdownPills.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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { Expandable } from './Expandable'; | ||
import { ExpandableGroup } from './ExpandableGroup'; | ||
|
||
const meta: Meta<typeof ExpandableGroup> = { | ||
component: ExpandableGroup, | ||
argTypes: { | ||
accordion: { control: 'boolean' } | ||
}, | ||
parameters: { | ||
docs: { | ||
description: { | ||
component: ` | ||
### CFPB DS - ExpandableGroup component | ||
Source: https://cfpb.github.io/design-system/components/expandables | ||
` | ||
} | ||
} | ||
} | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
const Content = ({ | ||
accordion | ||
}: { | ||
accordion: boolean | undefined; | ||
}): JSX.Element => { | ||
const linkPath = `/?path=/story/components-expandablegroup--${ | ||
accordion ? 'accordion' : 'default' | ||
}`; | ||
|
||
return ( | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Neque ipsa | ||
voluptatibus soluta nobis unde quisquam temporibus magnam debitis quidem. | ||
Ducimus ratione corporis nesciunt earum vel est quaerat blanditiis dolore | ||
ipsa? | ||
<a href={linkPath}>Lorem link</a> | ||
</div> | ||
); | ||
}; | ||
|
||
export const Default: Story = { | ||
render: arguments_ => ( | ||
<ExpandableGroup {...arguments_}> | ||
{['A', 'B', 'C'].map(value => ( | ||
<Expandable | ||
key={`item-${value}`} | ||
header={`Expandable ${value}`} | ||
inAccordion={arguments_.accordion} | ||
> | ||
<Content accordion={arguments_.accordion} /> | ||
</Expandable> | ||
))} | ||
</ExpandableGroup> | ||
), | ||
args: { | ||
groupId: 'DefaultGroup' | ||
} | ||
}; | ||
|
||
export const Accordion: Story = { | ||
...Default, | ||
args: { | ||
accordion: true, | ||
groupId: 'AccordionGroup' | ||
} | ||
}; |
File renamed without changes.
Oops, something went wrong.