@campxdev/react-native-blueprint 0.1.23 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/global.css +3 -3
- package/lib/global.css +1 -1
- package/lib/module/assets/icons/Image.png +0 -0
- package/lib/module/components/DataDisplay/Avatar/Avatar.js +1 -1
- package/lib/module/components/DataDisplay/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/DataDisplay/Banner/Banner.figma.js +17 -3
- package/lib/module/components/DataDisplay/Banner/Banner.figma.js.map +1 -1
- package/lib/module/components/DataDisplay/Banner/Banner.js +138 -34
- package/lib/module/components/DataDisplay/Banner/Banner.js.map +1 -1
- package/lib/module/components/DataDisplay/CalendarItem/CalendarItem.js +2 -2
- package/lib/module/components/DataDisplay/CalendarItem/CalendarItem.js.map +1 -1
- package/lib/module/components/DataDisplay/Card/Card.figma.js +11 -4
- package/lib/module/components/DataDisplay/Card/Card.figma.js.map +1 -1
- package/lib/module/components/DataDisplay/Card/Card.js +119 -65
- package/lib/module/components/DataDisplay/Card/Card.js.map +1 -1
- package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.figma.js +54 -0
- package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.figma.js.map +1 -0
- package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.js +318 -0
- package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.js.map +1 -0
- package/lib/module/components/DataDisplay/ChatBubble/index.js +4 -0
- package/lib/module/components/DataDisplay/ChatBubble/index.js.map +1 -0
- package/lib/module/components/DataDisplay/FeedCard/AttachmentDetails.js +69 -0
- package/lib/module/components/DataDisplay/FeedCard/AttachmentDetails.js.map +1 -0
- package/lib/module/components/DataDisplay/FeedCard/FeedCard.figma.js +19 -17
- package/lib/module/components/DataDisplay/FeedCard/FeedCard.figma.js.map +1 -1
- package/lib/module/components/DataDisplay/FeedCard/FeedCard.js +30 -19
- package/lib/module/components/DataDisplay/FeedCard/FeedCard.js.map +1 -1
- package/lib/module/components/DataDisplay/Greeting/Greeting.figma.js +5 -5
- package/lib/module/components/DataDisplay/Greeting/Greeting.figma.js.map +1 -1
- package/lib/module/components/DataDisplay/Greeting/Greeting.js +46 -70
- package/lib/module/components/DataDisplay/Greeting/Greeting.js.map +1 -1
- package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.figma.js +16 -0
- package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.figma.js.map +1 -0
- package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.js +111 -0
- package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.js.map +1 -0
- package/lib/module/components/DataDisplay/ProfileCard/index.js +4 -0
- package/lib/module/components/DataDisplay/ProfileCard/index.js.map +1 -0
- package/lib/module/components/Input/Button/Button.js +77 -129
- package/lib/module/components/Input/Button/Button.js.map +1 -1
- package/lib/module/components/Navigation/Appbar/AppBar.figma.js +18 -6
- package/lib/module/components/Navigation/Appbar/AppBar.figma.js.map +1 -1
- package/lib/module/components/Navigation/Appbar/AppBar.js +36 -9
- package/lib/module/components/Navigation/Appbar/AppBar.js.map +1 -1
- package/lib/module/components/Navigation/Popover/Popover.js +1 -1
- package/lib/module/components/Navigation/Popover/Popover.js.map +1 -1
- package/lib/module/components/ui/index.js +2 -0
- package/lib/module/components/ui/index.js.map +1 -1
- package/lib/module/lib/theme.js +2 -2
- package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.figma.js +196 -0
- package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.figma.js.map +1 -0
- package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.js +255 -0
- package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.js.map +1 -0
- package/lib/module/patterns/pattern-components/AccountPattern/index.js +4 -0
- package/lib/module/patterns/pattern-components/AccountPattern/index.js.map +1 -0
- package/lib/module/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.js +1 -1
- package/lib/module/patterns/pattern-components/CardListPattern/CardListPattern.js +2 -4
- package/lib/module/patterns/pattern-components/CardListPattern/CardListPattern.js.map +1 -1
- package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.figma.js +144 -0
- package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.figma.js.map +1 -0
- package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.js +213 -0
- package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.js.map +1 -0
- package/lib/module/patterns/pattern-components/FeedPattern/index.js +4 -0
- package/lib/module/patterns/pattern-components/FeedPattern/index.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.figma.js +70 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.figma.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.js +260 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/index.js +4 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/index.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.figma.js +82 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.figma.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.js +256 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/index.js +4 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/index.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.figma.js +73 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.figma.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.js +283 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/index.js +4 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/index.js.map +1 -0
- package/lib/module/patterns/pattern-components/index.js +5 -0
- package/lib/module/patterns/pattern-components/index.js.map +1 -1
- package/package.json +27 -1
- package/src/assets/icons/Image.png +0 -0
- package/src/components/DataDisplay/Avatar/Avatar.tsx +24 -21
- package/src/components/DataDisplay/Banner/Banner.figma.tsx +18 -3
- package/src/components/DataDisplay/Banner/Banner.tsx +153 -26
- package/src/components/DataDisplay/CalendarItem/CalendarItem.tsx +2 -2
- package/src/components/DataDisplay/Card/Card.figma.tsx +7 -3
- package/src/components/DataDisplay/Card/Card.tsx +152 -101
- package/src/components/DataDisplay/ChatBubble/ChatBubble.figma.tsx +54 -0
- package/src/components/DataDisplay/ChatBubble/ChatBubble.tsx +404 -0
- package/src/components/DataDisplay/ChatBubble/index.ts +8 -0
- package/src/components/DataDisplay/FeedCard/AttachmentDetails.tsx +96 -0
- package/src/components/DataDisplay/FeedCard/FeedCard.figma.tsx +17 -15
- package/src/components/DataDisplay/FeedCard/FeedCard.tsx +66 -35
- package/src/components/DataDisplay/Greeting/Greeting.figma.tsx +5 -5
- package/src/components/DataDisplay/Greeting/Greeting.tsx +58 -96
- package/src/components/DataDisplay/ProfileCard/ProfileCard.figma.tsx +17 -0
- package/src/components/DataDisplay/ProfileCard/ProfileCard.tsx +173 -0
- package/src/components/DataDisplay/ProfileCard/index.ts +1 -0
- package/src/components/Input/Button/Button.tsx +71 -157
- package/src/components/Navigation/Appbar/AppBar.figma.tsx +18 -6
- package/src/components/Navigation/Appbar/AppBar.tsx +58 -13
- package/src/components/Navigation/Popover/Popover.tsx +3 -3
- package/src/components/ui/index.ts +2 -0
- package/src/lib/theme.ts +2 -2
- package/src/patterns/pattern-components/AccountPattern/AccountPattern.figma.tsx +193 -0
- package/src/patterns/pattern-components/AccountPattern/AccountPattern.tsx +301 -0
- package/src/patterns/pattern-components/AccountPattern/index.ts +1 -0
- package/src/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.tsx +1 -1
- package/src/patterns/pattern-components/CardListPattern/CardListPattern.tsx +4 -9
- package/src/patterns/pattern-components/FeedPattern/FeedPattern.figma.tsx +146 -0
- package/src/patterns/pattern-components/FeedPattern/FeedPattern.tsx +264 -0
- package/src/patterns/pattern-components/FeedPattern/index.ts +2 -0
- package/src/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.figma.tsx +66 -0
- package/src/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.tsx +326 -0
- package/src/patterns/pattern-components/HomeFacultyPattern/index.ts +2 -0
- package/src/patterns/pattern-components/HomeParentPattern/HomeParentPattern.figma.tsx +75 -0
- package/src/patterns/pattern-components/HomeParentPattern/HomeParentPattern.tsx +328 -0
- package/src/patterns/pattern-components/HomeParentPattern/index.ts +2 -0
- package/src/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.figma.tsx +66 -0
- package/src/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.tsx +355 -0
- package/src/patterns/pattern-components/HomeStudentPattern/index.ts +2 -0
- package/src/patterns/pattern-components/index.ts +5 -0
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { View as RNView, Pressable as RNPressable } from 'react-native';
|
|
4
4
|
import { cssInterop } from 'nativewind';
|
|
5
|
-
import {
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { Plus } from 'lucide-react-native';
|
|
7
|
+
import { cn } from '../../../lib/utils';
|
|
7
8
|
import { Text } from '../../Input/Text/Text';
|
|
8
9
|
import { Badge } from '../Badge/Badge';
|
|
9
|
-
import { Icon } from '../../ui/Icon';
|
|
10
10
|
|
|
11
11
|
cssInterop(RNView, { className: 'style' });
|
|
12
12
|
cssInterop(RNPressable, { className: 'style' });
|
|
13
|
-
cssInterop(LinearGradient, { className: 'style' });
|
|
14
13
|
|
|
15
14
|
const View = RNView as React.ComponentType<
|
|
16
15
|
React.ComponentProps<typeof RNView> & { className?: string }
|
|
@@ -19,6 +18,96 @@ const Pressable = RNPressable as React.ComponentType<
|
|
|
19
18
|
React.ComponentProps<typeof RNPressable> & { className?: string }
|
|
20
19
|
>;
|
|
21
20
|
|
|
21
|
+
// ============================================================================
|
|
22
|
+
// VARIANTS
|
|
23
|
+
// ============================================================================
|
|
24
|
+
|
|
25
|
+
export const BannerVariants = {
|
|
26
|
+
style: ['solid', 'outline', 'subtle'] as const,
|
|
27
|
+
} as const;
|
|
28
|
+
|
|
29
|
+
type BannerStyle = (typeof BannerVariants.style)[number];
|
|
30
|
+
|
|
31
|
+
const bannerVariants = cva(
|
|
32
|
+
'w-full flex-row items-center justify-between gap-4 rounded-lg p-4',
|
|
33
|
+
{
|
|
34
|
+
variants: {
|
|
35
|
+
style: {
|
|
36
|
+
solid: 'bg-highlight-highlight-purple',
|
|
37
|
+
outline: 'border border-border-default bg-surface-default',
|
|
38
|
+
subtle:
|
|
39
|
+
'border border-highlight-highlight-purple bg-highlight-highlight-purple-muted',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
style: 'solid',
|
|
44
|
+
},
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
const titleVariants = cva('font-semibold text-base', {
|
|
49
|
+
variants: {
|
|
50
|
+
style: {
|
|
51
|
+
solid: 'text-base-white',
|
|
52
|
+
outline: 'text-text-primary',
|
|
53
|
+
subtle: 'text-text-primary',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
style: 'solid',
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const subtitleVariants = cva('font-medium text-xs opacity-70', {
|
|
62
|
+
variants: {
|
|
63
|
+
style: {
|
|
64
|
+
solid: 'text-base-white',
|
|
65
|
+
outline: 'text-text-primary',
|
|
66
|
+
subtle: 'text-text-primary',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
defaultVariants: {
|
|
70
|
+
style: 'solid',
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const actionItemVariants = cva('font-medium text-xs', {
|
|
75
|
+
variants: {
|
|
76
|
+
style: {
|
|
77
|
+
solid: 'text-base-white',
|
|
78
|
+
outline: 'text-text-primary',
|
|
79
|
+
subtle: 'text-text-primary',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
defaultVariants: {
|
|
83
|
+
style: 'solid',
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const dotVariants = cva('h-1 w-1 rounded-full', {
|
|
88
|
+
variants: {
|
|
89
|
+
style: {
|
|
90
|
+
solid: 'bg-base-white',
|
|
91
|
+
outline: 'bg-text-primary',
|
|
92
|
+
subtle: 'bg-text-primary',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
defaultVariants: {
|
|
96
|
+
style: 'solid',
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// ============================================================================
|
|
101
|
+
// HELPER
|
|
102
|
+
// ============================================================================
|
|
103
|
+
|
|
104
|
+
function normalizeStyle(v: any): BannerStyle {
|
|
105
|
+
const s = String(v ?? 'solid').toLowerCase();
|
|
106
|
+
return (
|
|
107
|
+
['solid', 'outline', 'subtle'].includes(s) ? s : 'solid'
|
|
108
|
+
) as BannerStyle;
|
|
109
|
+
}
|
|
110
|
+
|
|
22
111
|
// ============================================================================
|
|
23
112
|
// TYPES
|
|
24
113
|
// ============================================================================
|
|
@@ -27,10 +116,20 @@ export interface BannerProps {
|
|
|
27
116
|
title?: string;
|
|
28
117
|
subtitle?: string;
|
|
29
118
|
showBadge?: boolean;
|
|
119
|
+
badgeVariant?: string;
|
|
120
|
+
badgeSize?: string;
|
|
121
|
+
badgeShowLeftIcon?: boolean;
|
|
122
|
+
badgeShowRightIcon?: boolean;
|
|
30
123
|
badgeText?: string;
|
|
124
|
+
actionItem1?: string;
|
|
125
|
+
actionItem2?: string;
|
|
126
|
+
moreLabel?: string;
|
|
31
127
|
showActionItems?: boolean;
|
|
32
|
-
|
|
128
|
+
showActionItem2?: boolean;
|
|
129
|
+
showMoreLabel?: boolean;
|
|
33
130
|
showTrailing?: boolean;
|
|
131
|
+
trailingIcon?: React.ReactNode;
|
|
132
|
+
style?: BannerStyle | 'Solid' | 'Outline' | 'Subtle';
|
|
34
133
|
onTrailingPress?: () => void;
|
|
35
134
|
testID?: string;
|
|
36
135
|
}
|
|
@@ -43,49 +142,77 @@ function Banner({
|
|
|
43
142
|
title = 'Banner Title',
|
|
44
143
|
subtitle = 'Subtitle of the banner goes here',
|
|
45
144
|
showBadge = true,
|
|
145
|
+
badgeVariant = 'secondary',
|
|
146
|
+
badgeSize = 'sm',
|
|
147
|
+
badgeShowLeftIcon = false,
|
|
148
|
+
badgeShowRightIcon = false,
|
|
46
149
|
badgeText = 'Badge',
|
|
150
|
+
actionItem1 = 'Action Item',
|
|
151
|
+
actionItem2 = 'Action Item',
|
|
152
|
+
moreLabel = '+ N Items',
|
|
47
153
|
showActionItems = true,
|
|
48
|
-
|
|
154
|
+
showActionItem2 = true,
|
|
155
|
+
showMoreLabel = true,
|
|
49
156
|
showTrailing = true,
|
|
157
|
+
trailingIcon,
|
|
158
|
+
style = 'solid',
|
|
50
159
|
onTrailingPress,
|
|
51
160
|
testID,
|
|
52
161
|
}: BannerProps) {
|
|
162
|
+
const st = normalizeStyle(style);
|
|
163
|
+
const defaultTrailingIcon = (
|
|
164
|
+
<Plus
|
|
165
|
+
size={16}
|
|
166
|
+
color={st === 'solid' ? 'white' : 'hsl(var(--foreground))'}
|
|
167
|
+
/>
|
|
168
|
+
);
|
|
169
|
+
|
|
53
170
|
return (
|
|
54
|
-
<
|
|
55
|
-
testID={testID}
|
|
56
|
-
colors={['#573dab', '#573dab33']}
|
|
57
|
-
start={{ x: 0, y: 0 }}
|
|
58
|
-
end={{ x: 1, y: 1 }}
|
|
59
|
-
className="w-full max-w-[400px] flex-row items-center justify-between gap-4 rounded-lg p-4"
|
|
60
|
-
>
|
|
171
|
+
<View testID={testID} className={cn(bannerVariants({ style: st }))}>
|
|
61
172
|
{/* Main Content */}
|
|
62
173
|
<View className="flex-1 flex-col gap-5">
|
|
63
174
|
{/* Header with Title and Badge */}
|
|
64
175
|
<View className="flex-col gap-1">
|
|
65
176
|
<View className="flex-row items-center gap-2">
|
|
66
|
-
<Text className=
|
|
177
|
+
<Text className={cn(titleVariants({ style: st }))}>{title}</Text>
|
|
67
178
|
{showBadge && (
|
|
68
|
-
<Badge
|
|
179
|
+
<Badge
|
|
180
|
+
variant={badgeVariant}
|
|
181
|
+
size={badgeSize}
|
|
182
|
+
showLeftIcon={badgeShowLeftIcon}
|
|
183
|
+
showRightIcon={badgeShowRightIcon}
|
|
184
|
+
>
|
|
69
185
|
<Text>{badgeText}</Text>
|
|
70
186
|
</Badge>
|
|
71
187
|
)}
|
|
72
188
|
</View>
|
|
73
|
-
<Text className=
|
|
189
|
+
<Text className={cn(subtitleVariants({ style: st }))}>
|
|
74
190
|
{subtitle}
|
|
75
191
|
</Text>
|
|
76
192
|
</View>
|
|
77
193
|
|
|
78
194
|
{/* Action Items */}
|
|
79
|
-
{showActionItems &&
|
|
195
|
+
{showActionItems && (
|
|
80
196
|
<View className="flex-row items-center gap-3">
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
|
|
197
|
+
<Text className={cn(actionItemVariants({ style: st }))}>
|
|
198
|
+
{actionItem1}
|
|
199
|
+
</Text>
|
|
200
|
+
{showActionItem2 && (
|
|
201
|
+
<>
|
|
202
|
+
<View className={cn(dotVariants({ style: st }))} />
|
|
203
|
+
<Text className={cn(actionItemVariants({ style: st }))}>
|
|
204
|
+
{actionItem2}
|
|
205
|
+
</Text>
|
|
206
|
+
</>
|
|
207
|
+
)}
|
|
208
|
+
{showMoreLabel && (
|
|
209
|
+
<>
|
|
210
|
+
<View className={cn(dotVariants({ style: st }))} />
|
|
211
|
+
<Text className={cn(actionItemVariants({ style: st }))}>
|
|
212
|
+
{moreLabel}
|
|
213
|
+
</Text>
|
|
214
|
+
</>
|
|
215
|
+
)}
|
|
89
216
|
</View>
|
|
90
217
|
)}
|
|
91
218
|
</View>
|
|
@@ -97,10 +224,10 @@ function Banner({
|
|
|
97
224
|
hitSlop={12}
|
|
98
225
|
className="flex-row items-center justify-center"
|
|
99
226
|
>
|
|
100
|
-
|
|
227
|
+
{trailingIcon || defaultTrailingIcon}
|
|
101
228
|
</Pressable>
|
|
102
229
|
)}
|
|
103
|
-
</
|
|
230
|
+
</View>
|
|
104
231
|
);
|
|
105
232
|
}
|
|
106
233
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { cssInterop } from 'nativewind';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
4
|
+
import { cssInterop } from 'nativewind';
|
|
5
5
|
|
|
6
|
-
import { cn } from '../../../lib/utils';
|
|
7
6
|
import { Badge, type BadgeProps } from '../../DataDisplay/Badge/Badge';
|
|
8
7
|
import { Text } from '../../Input/Text/Text';
|
|
8
|
+
import { cn } from '../../../lib/utils';
|
|
9
9
|
|
|
10
10
|
cssInterop(View, { className: 'style' });
|
|
11
11
|
|
|
@@ -2,30 +2,34 @@ import figma from '@figma/code-connect';
|
|
|
2
2
|
import { Card } from './Card';
|
|
3
3
|
|
|
4
4
|
const FIGMA_URL =
|
|
5
|
-
'https://www.figma.com/design/66WaqopqU3WXgwVtyQuTUf/React-Native-Blueprint-Library?node-id=
|
|
5
|
+
'https://www.figma.com/design/66WaqopqU3WXgwVtyQuTUf/React-Native-Blueprint-Library?node-id=371-4790';
|
|
6
6
|
|
|
7
7
|
figma.connect(Card, FIGMA_URL, {
|
|
8
8
|
props: {
|
|
9
|
+
size: figma.enum('size', { lg: 'lg', sm: 'sm' }),
|
|
9
10
|
showMedia: figma.boolean('Show Media'),
|
|
10
|
-
showHeader: figma.boolean('Show Header'),
|
|
11
11
|
title: figma.string('Title'),
|
|
12
12
|
showSubtitle: figma.boolean('Show Subtitle'),
|
|
13
13
|
subtitle: figma.string('Subtitle'),
|
|
14
|
-
showBody: figma.boolean('Show Body'),
|
|
15
14
|
showLeading: figma.boolean('Show Leading'),
|
|
16
15
|
showFooterActions: figma.boolean('Show FooterActions'),
|
|
17
16
|
showBadges: figma.boolean('Show Badges'),
|
|
17
|
+
showBody: figma.boolean('Show Body'),
|
|
18
|
+
showOverflowMenu: figma.boolean('Show CardOptions'),
|
|
18
19
|
},
|
|
19
20
|
|
|
20
21
|
example: (props) => (
|
|
21
22
|
<Card
|
|
23
|
+
size={props.size}
|
|
22
24
|
showMedia={props.showMedia}
|
|
23
25
|
showSubtitle={props.showSubtitle}
|
|
24
26
|
showBadges={props.showBadges}
|
|
25
27
|
showFooterActions={props.showFooterActions}
|
|
26
28
|
showLeading={props.showLeading}
|
|
29
|
+
showOverflowMenu={props.showOverflowMenu}
|
|
27
30
|
title={props.title}
|
|
28
31
|
subtitle={props.subtitle}
|
|
32
|
+
body="The card may contain body content which can be truncated to 1-2 lines."
|
|
29
33
|
avatarInitials="AB"
|
|
30
34
|
badge1Text="Badge 1"
|
|
31
35
|
badge2Text="Badge 2"
|