Skip to content

Commit e2d26ae

Browse files
authored
feat(Section): support file field in section header (#1115)
* feat(Section): support file field in section header * feat(Section): support file field in section header
1 parent 2eb3318 commit e2d26ae

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

packages/components/src/components/Section/components/SectionHeader/SectionHeader.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const SectionHeader: FC<SectionHeaderProps> = (props) => {
2323
size: "s",
2424
tunnelId: "actions",
2525
},
26+
FileField: { tunnelId: "actions", Button: { size: "s" } },
2627
ContextMenuTrigger: {
2728
tunnelId: "actions",
2829
Button: {

packages/components/src/components/Section/stories/Default.stories.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
import ContextMenuTrigger from "@/components/ContextMenu/components/ContextMenuTrigger";
2525
import { ContextMenu } from "@/components/ContextMenu";
2626
import MenuItem from "@/components/MenuItem";
27+
import { FileField } from "@/components/FileField";
2728

2829
const meta: Meta<typeof Section> = {
2930
title: "Structure/Section",
@@ -195,3 +196,20 @@ export const HideSeperator: Story = {
195196
</>
196197
),
197198
};
199+
200+
export const WithFileField: Story = {
201+
render: (props) => (
202+
<>
203+
<Section {...props} hideSeparator>
204+
<Header>
205+
<Heading>Domains</Heading>
206+
<FileField>
207+
<Button>Import CSV</Button>
208+
</FileField>
209+
<Button>Add</Button>
210+
</Header>
211+
<Text>Add at least one domain.</Text>
212+
</Section>
213+
</>
214+
),
215+
};

0 commit comments

Comments
 (0)