forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotificationDrawerGroups.figma.tsx
More file actions
42 lines (37 loc) · 1.11 KB
/
NotificationDrawerGroups.figma.tsx
File metadata and controls
42 lines (37 loc) · 1.11 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
import figma from '@figma/code-connect';
import { NotificationDrawerGroup, NotificationDrawerList } from '@patternfly/react-core';
// TODO: DESIGN: Split unread count into a separate prop
figma.connect(
NotificationDrawerGroup,
'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/PatternFly-6--Components?node-id=3172-18190',
{
props: {
// string
headingText: figma.string('Group title'),
count: 3,
// boolean
badgeProps: figma.boolean('Has count', {
true: figma.nestedProps('Badge', {
count: figma.string('Text')
}),
false: { count: undefined }
}),
// enum
isExpanded: figma.enum('Type', {
Collapsed: false,
Expanded: true
}),
children: figma.children('Notification drawer item')
},
example: (props) => (
<NotificationDrawerGroup
title={props.headingText}
isExpanded={props.isExpanded}
count={props.badgeProps.count}
onExpand={() => {}}
>
<NotificationDrawerList>{props.children}</NotificationDrawerList>
</NotificationDrawerGroup>
)
}
);