-
Notifications
You must be signed in to change notification settings - Fork 381
Expand file tree
/
Copy pathDualListHeader.figma.tsx
More file actions
65 lines (60 loc) · 2.02 KB
/
DualListHeader.figma.tsx
File metadata and controls
65 lines (60 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import figma from '@figma/code-connect';
import { Button, ButtonVariant, DualListSelectorPane, SearchInput } from '@patternfly/react-core';
import RhMicronsCloseIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
// Documentation for DualListHeader can be found at https://www.patternfly.org/components/dual-list-selector
figma.connect(
DualListSelectorPane,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=21279-116172',
{
props: {
icon: <RhMicronsCloseIcon />, // placeholder icon
// string
itemInformation: figma.string('Item information'),
title: figma.string('Header text'),
// boolean
onSearch: figma.boolean('Has search bar', {
true: () => {},
false: undefined
}),
isSearchable: figma.boolean('Has search bar', {
true: (
<SearchInput value={currentPaneFilters} onChange={() => {}} onClear={() => {}} aria-label={paneSearchLabel} />
),
false: undefined
}),
actions: figma.boolean('Has search bar', {
true: [
<Button
variant={ButtonVariant.plain}
onClick={() => {}}
aria-label="Sort Chosen"
key="chosenSortButton"
isDisabled={false}
/* icon={props.icon} */
/>,
<Button
variant={ButtonVariant.plain}
onClick={() => {}}
aria-label="Sort Available"
key="availableSortButton"
isDisabled={false}
/* icon={props.icon} */
/>
]
}),
children: figma.children('*')
},
example: (props) => (
// Documentation for DualListHeader can be found at https://www.patternfly.org/components/dual-list-selector
<DualListSelectorPane
actions={props.actions}
listMinHeight="300px"
onSearch={props.onSearch}
searchInput={props.isSearchable}
title={props.title}
>
{props.children}
</DualListSelectorPane>
)
}
);