Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages/code-connect/components/Table/BasicRow.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import figma from '@figma/code-connect';
import { Tr } from '@patternfly/react-table';

// Documentation for BasicRow can be found at https://www.patternfly.org/components/table

figma.connect(Tr, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=2930-36939', {
props: {
// boolean
isExpanded: figma.boolean('Expanded'),
isRowSelected: figma.boolean('Selected'),

// enum
children: figma.children('*')
},
example: (props) => (
<Tr isExpanded={props.isExpanded} isRowSelected={props.isRowSelected}>
{props.children}
</Tr>
)
});
26 changes: 26 additions & 0 deletions packages/code-connect/components/Table/ClickableRow.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import figma from '@figma/code-connect';
import { Tr } from '@patternfly/react-table';

// Documentation for BasicRow can be found at https://www.patternfly.org/components/table

figma.connect(Tr, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=2930-40632', {
props: {
isExpanded: figma.boolean('Expanded'),
isRowSelected: figma.enum('State', {
Clicked: true
}),

children: figma.children('*')
},
example: (props) => (
<Tr
onRowClick={() => {}}
isSelectable
isExpanded={props.isExpanded}
isClickable
isRowSelected={props.isRowSelected}
>
{props.children}
</Tr>
)
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import figma from '@figma/code-connect';
import { Table } from '@patternfly/react-table';

// Documentation for BasicRow can be found at https://www.patternfly.org/components/table

figma.connect(
Table,
'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=6482-49461',
{
props: {
// enum
variant: figma.enum('Size', { Compact: 'compact' }),

children: figma.children('*')
},
example: (props) => (
<Table variant={props.variant} aria-label="Column based table">
{props.children}test
</Table>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import figma from '@figma/code-connect';
import { Th } from '@patternfly/react-table';

// Documentation for header cell can be found at https://www.patternfly.org/components/table

figma.connect(Th, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=14-623', {
props: {
info: figma.boolean('Show help icon', {
true: { tooltip: 'More information ' },
false: undefined
}),
sort: figma.boolean('Sortable', {
true: `getSortParams(<row-index>)`,
false: undefined
})
},
example: (props) => (
<Th sort={props.sort} info={props.info}>
Header
</Th>
)
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import figma from '@figma/code-connect';
import { Th } from '@patternfly/react-table';

// Documentation for BasicRow can be found at https://www.patternfly.org/components/table

figma.connect(Th, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=6241-29618', {
props: {
selectAll: figma.boolean('Select all', {
true: (
<Th
select={{
onSelect: () => {},
isSelected: false
}}
aria-label="Row select"
/>
),
false: undefined
}),
expandableAll: figma.boolean('Expandable all', {
true: (
<Th
expand={{
onToggle: () => {}
}}
aria-label="Row expand"
/>
),
false: undefined
}),
isDraggable: figma.boolean('Is draggable', {
true: <Th draggableRow={{ id: `draggable-row-id` }} />,
false: undefined
})
},
example: (props) => (
<>
{props.selectAll}
{props.expandableAll}
{props.isDraggable}
</>
)
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import figma from '@figma/code-connect';
import { Th } from '@patternfly/react-table';

// Documentation for BasicRow can be found at https://www.patternfly.org/components/table

figma.connect(Th, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=6241-29627', {
props: {
children: figma.children('*')
},
example: (props) => <Th>{props.children}</Th>
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import figma from '@figma/code-connect';
import { Tr } from '@patternfly/react-table';

// Documentation for BasicRow can be found at https://www.patternfly.org/components/table

figma.connect(Tr, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=2945-48504', {
props: {
showActions: figma.boolean('Show actions'),
children: figma.children('*')
},
example: (props) => <Tr>{props.children}</Tr>
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import figma from '@figma/code-connect';
import { Table } from '@patternfly/react-table';

// Documentation for Table can be found at https://www.patternfly.org/components/table

figma.connect(
Table,
'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=6482-55919',
{
props: {
children: figma.children('*')
},
example: (props) => (
<Table isExpandable aria-label="Compound expandable table">
{props.children}
</Table>
)
}
);
15 changes: 15 additions & 0 deletions packages/code-connect/components/Table/DraggableRow.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import figma from '@figma/code-connect';
import { Tr } from '@patternfly/react-table';

// Documentation for Table can be found at https://www.patternfly.org/components/table

figma.connect(Tr, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=21288-130668', {
props: {
children: figma.children('*')
},
example: (props) => (
<Tr id="draggable-row-id" draggable onDrop={() => {}} onDragEnd={() => {}} onDragStart={() => {}}>
{props.children}
</Tr>
)
});
18 changes: 18 additions & 0 deletions packages/code-connect/components/Table/LeftActionsColumn.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import figma from '@figma/code-connect';
import { ActionsColumn, Td, Th } from '@patternfly/react-table';

// Documentation for Table can be found at https://www.patternfly.org/components/table

figma.connect(Td, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=6441-38440', {
props: {
tableCell: figma.boolean('Column header', {
true: <Th screenReaderText="Action cell" />,
false: (
<Td isActionCell>
<ActionsColumn items={[]} />
</Td>
)
})
},
example: (props) => <>{props.tableCell}</>
});
22 changes: 22 additions & 0 deletions packages/code-connect/components/Table/RightActionColumn.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import figma from '@figma/code-connect';
import { ActionsColumn, Td, Th } from '@patternfly/react-table';

// Documentation for Table can be found at https://www.patternfly.org/components/table

figma.connect(
Td,
'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=6441-38900&m=dev',
{
props: {
tableCell: figma.boolean('Column header', {
true: <Th screenReaderText="Action cell" />,
false: (
<Td isActionCell>
<ActionsColumn items={[]} />
</Td>
)
})
},
example: (props) => <>{props.tableCell}</>
}
);
11 changes: 11 additions & 0 deletions packages/code-connect/components/Table/RowBackgrounds.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import figma from '@figma/code-connect';
import { Tr } from '@patternfly/react-table';

// Documentation for Table can be found at https://www.patternfly.org/components/table

figma.connect(Tr, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=6441-39265', {
props: {
children: figma.children('*')
},
example: (props) => <Tr>{props.children}</Tr>
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import figma from '@figma/code-connect';
import { Table } from '@patternfly/react-table';

// Documentation for Table can be found at https://www.patternfly.org/components/table

figma.connect(
Table,
'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=3331-12049',
{
props: {
// boolean
isBordered: figma.boolean('Bordered'),
isExpandable: figma.boolean('Expandable'),

// enum
variant: figma.enum('Size', { Compact: 'compact' }),
children: figma.children('*')
},
example: (props) => (
<Table variant={props.variant} borders={props.isBordered} isExpandable={props.isExpandable}>
{props.children}
</Table>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import figma from '@figma/code-connect';
import { Td } from '@patternfly/react-table';

// Documentation for Table can be found at https://www.patternfly.org/components/table

figma.connect(Td, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=2912-36168', {
props: {
children: figma.children('*')
},
example: (props) => <Td>{props.children}</Td>
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import figma from '@figma/code-connect';
import { Td } from '@patternfly/react-table';

// Documentation for Table can be found at https://www.patternfly.org/components/table

figma.connect(Td, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=14-389', {
props: {
children: figma.children('*')
},
example: (props) => <Td>{props.children}</Td>
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import figma from '@figma/code-connect';
import { Td } from '@patternfly/react-table';

// Documentation for Table can be found at https://www.patternfly.org/components/table

figma.connect(Td, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=2930-36766', {
props: {
selectAll: figma.boolean('Row select', {
true: (
<Td
select={{
onSelect: () => {},
isSelected: false
}}
aria-label="Row select"
/>
),
false: undefined
}),
expandableAll: figma.boolean('Row expansion', {
true: (
<Td
expand={{
onToggle: () => {}
}}
aria-label="Row expand"
/>
),
false: undefined
}),
isDraggable: figma.boolean('Is draggable', {
true: <Td draggableRow={{ id: `draggable-row-id` }} />,
false: undefined
})
},
example: (props) => (
<>
{props.selectAll}
{props.expandableAll}
{props.isDraggable}
</>
)
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import figma from '@figma/code-connect';
import { Td } from '@patternfly/react-table';

// Documentation for Table can be found at https://www.patternfly.org/components/table

figma.connect(Td, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=2912-36519', {
props: {
children: figma.children('*')
},
example: (props) => <Td>{props.children}</Td>
});
15 changes: 15 additions & 0 deletions packages/code-connect/components/Table/TableHeaderRow.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import figma from '@figma/code-connect';
import { Thead, Tr } from '@patternfly/react-table';

// Documentation for Table can be found at https://www.patternfly.org/components/table

figma.connect(Tr, 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=2912-35117', {
props: {
children: figma.children('*')
},
example: (props) => (
<Thead>
<Tr>{props.children}</Tr>
</Thead>
)
});
15 changes: 15 additions & 0 deletions packages/code-connect/components/Table/_ContentColumn.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// import figma from '@figma/code-connect';
// import { ContentColumn } from '@patternfly/react-table';

// // Documentation for Table can be found at https://www.patternfly.org/components/table

// figma.connect(
// ContentColumn,
// 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=6441-38677',
// {
// props: {
// columnHeader: figma.boolean('Column header')
// },
// example: (props) => <ContentColumn />
// }
// );
Loading
Loading