forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotificationDrawerHeader.figma.tsx
More file actions
62 lines (60 loc) · 1.85 KB
/
NotificationDrawerHeader.figma.tsx
File metadata and controls
62 lines (60 loc) · 1.85 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
import figma from '@figma/code-connect';
import { Dropdown, DropdownItem, DropdownList, MenuToggle, NotificationDrawerHeader } from '@patternfly/react-core';
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons//ellipsis-v-icon';
figma.connect(
NotificationDrawerHeader,
'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=3170-17841',
{
props: {
// boolean
hasActionsMenu: figma.boolean('Has actions menu', {
true: {
dropdown: (
<Dropdown
onSelect={() => {}}
isOpen={false}
onOpenChange={() => {}}
popperProps={{ position: 'right' }}
toggle={(refToggle) => (
<MenuToggle
ref={refToggle}
isExpanded={false}
onClick={() => {}}
variant="plain"
aria-label={`Basic example header kebab toggle`}
icon={<EllipsisVIcon />}
/>
)}
>
<DropdownList>
<DropdownItem>Item 1</DropdownItem>
<DropdownItem>Item 2</DropdownItem>
<DropdownItem>Item 3</DropdownItem>
</DropdownList>
</Dropdown>
),
onClose: () => {}
},
false: {
dropdown: undefined,
onClose: undefined
}
}),
showUnreadCount: figma.boolean('Show unread count', {
true: 3,
false: NaN
}),
// string
headingText: figma.string('Heading text')
},
example: (props) => (
<NotificationDrawerHeader
count={props.showUnreadCount}
onClose={props.hasActionsMenu.onClose}
title={props.headingText}
>
{props.hasActionsMenu.dropdown}
</NotificationDrawerHeader>
)
}
);