opus-toolkit-components 1.6.8 → 1.7.0
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/lib/index.d.ts +380 -123
- package/lib/opus-components.main.js +58366 -18473
- package/lib/opus-components.main.js.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -3,186 +3,344 @@ declare module "opus-toolkit-components" {
|
|
|
3
3
|
|
|
4
4
|
// Accordion
|
|
5
5
|
export interface AccordionProps {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
title: string | React.ReactNode;
|
|
7
|
+
handleToggle?: (index: number) => void;
|
|
8
|
+
activeIndex?: number;
|
|
9
|
+
index: number;
|
|
10
|
+
isPreview?: boolean;
|
|
11
|
+
isLocked?: boolean;
|
|
12
|
+
onExitPreview?: () => void;
|
|
13
|
+
content: React.ReactNode;
|
|
14
|
+
preview?: React.ReactNode;
|
|
15
|
+
isPill?: boolean;
|
|
16
|
+
pillText?: string;
|
|
17
|
+
pillStatus?: "success" | "warning" | "error" | "info" | string;
|
|
18
|
+
pillIcon?: React.ReactNode;
|
|
19
|
+
disabled?: boolean;
|
|
8
20
|
}
|
|
21
|
+
|
|
9
22
|
export const Accordion: React.ComponentType<AccordionProps>;
|
|
10
23
|
|
|
11
|
-
//
|
|
12
|
-
export interface
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
24
|
+
// BarLayout
|
|
25
|
+
export interface BarLayoutProps {
|
|
26
|
+
left?: React.ReactNode;
|
|
27
|
+
center?: React.ReactNode;
|
|
28
|
+
right?: React.ReactNode;
|
|
18
29
|
className?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const BarLayout: React.ComponentType<BarLayoutProps>;
|
|
33
|
+
|
|
34
|
+
// Button
|
|
35
|
+
export type ButtonRank =
|
|
36
|
+
| "primary"
|
|
37
|
+
| "secondary"
|
|
38
|
+
| "tertiary"
|
|
39
|
+
| "outline"
|
|
40
|
+
| "destructive";
|
|
41
|
+
|
|
42
|
+
export type ButtonState = "default" | "disabled";
|
|
43
|
+
|
|
44
|
+
export type ButtonSize = "sm" | "md" | "lg" | "xl" | string;
|
|
45
|
+
|
|
46
|
+
export type IconComponent = (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
|
|
47
|
+
|
|
48
|
+
export interface ButtonProps
|
|
49
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
50
|
+
type?: "button" | "submit" | "reset";
|
|
51
|
+
rank?: ButtonRank;
|
|
52
|
+
state?: ButtonState;
|
|
53
|
+
text?: string;
|
|
54
|
+
size?: ButtonSize;
|
|
19
55
|
name?: string;
|
|
20
|
-
|
|
56
|
+
dataCy?: string;
|
|
57
|
+
tabIndex?: number;
|
|
58
|
+
isFullWidth?: boolean;
|
|
59
|
+
icon?: IconComponent;
|
|
60
|
+
iconPosition?: "left" | "right";
|
|
61
|
+
isIconAnimated?: boolean;
|
|
62
|
+
isSaving?: boolean;
|
|
63
|
+
savingText?: string;
|
|
64
|
+
className?: string;
|
|
65
|
+
title?: string;
|
|
66
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
21
67
|
}
|
|
68
|
+
|
|
22
69
|
export const Button: React.ComponentType<ButtonProps>;
|
|
23
70
|
|
|
24
71
|
// Card
|
|
25
|
-
export
|
|
26
|
-
|
|
72
|
+
export type CardIntent =
|
|
73
|
+
| "default"
|
|
74
|
+
| "info"
|
|
75
|
+
| "warning"
|
|
76
|
+
| "success"
|
|
77
|
+
| "error"
|
|
78
|
+
| "brand"
|
|
79
|
+
| "brandSecondary";
|
|
80
|
+
|
|
81
|
+
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
82
|
+
intent?: CardIntent;
|
|
27
83
|
className?: string;
|
|
84
|
+
children?: React.ReactNode;
|
|
28
85
|
}
|
|
86
|
+
|
|
29
87
|
export const Card: React.ComponentType<CardProps>;
|
|
30
88
|
|
|
31
|
-
//
|
|
32
|
-
export interface
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
89
|
+
// CookieBanner
|
|
90
|
+
export interface CookieBannerProps {
|
|
91
|
+
logo?: string;
|
|
92
|
+
policyTxt?: string;
|
|
93
|
+
linkTxt?: string;
|
|
94
|
+
isVisible?: boolean;
|
|
95
|
+
onAccept?: () => void;
|
|
96
|
+
onLearnMore?: () => void;
|
|
97
|
+
intent?: string;
|
|
39
98
|
}
|
|
40
|
-
export const Input: React.ComponentType<InputProps>;
|
|
41
99
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
100
|
+
export const CookieBanner: React.ComponentType<CookieBannerProps>;
|
|
101
|
+
|
|
102
|
+
// Footer
|
|
103
|
+
export interface FooterProps {
|
|
104
|
+
left?: React.ReactNode;
|
|
105
|
+
center?: React.ReactNode;
|
|
106
|
+
right?: React.ReactNode;
|
|
48
107
|
className?: string;
|
|
49
108
|
}
|
|
50
|
-
export const DatePicker: React.ComponentType<DatePickerProps>;
|
|
51
109
|
|
|
52
|
-
|
|
53
|
-
export interface RadioButtonProps {
|
|
54
|
-
name?: string;
|
|
55
|
-
value?: string;
|
|
56
|
-
checked?: boolean;
|
|
57
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
58
|
-
}
|
|
59
|
-
export const RadioButton: React.ComponentType<RadioButtonProps>;
|
|
110
|
+
export const Footer: React.ComponentType<FooterProps>;
|
|
60
111
|
|
|
61
112
|
// Checkbox
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
113
|
+
|
|
114
|
+
export interface CheckboxChangeEvent {
|
|
115
|
+
target: {
|
|
116
|
+
name: string;
|
|
117
|
+
value: boolean;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface CheckboxProps
|
|
122
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
123
|
+
label: string;
|
|
124
|
+
name: string;
|
|
125
|
+
onChange?: (event: CheckboxChangeEvent) => void;
|
|
126
|
+
value?: boolean;
|
|
127
|
+
isValid?: boolean;
|
|
128
|
+
errorMessage?: string;
|
|
129
|
+
disabled?: boolean;
|
|
130
|
+
title?: string;
|
|
131
|
+
dataCy?: string;
|
|
67
132
|
}
|
|
133
|
+
|
|
68
134
|
export const Checkbox: React.ComponentType<CheckboxProps>;
|
|
69
135
|
|
|
70
|
-
//
|
|
71
|
-
export interface
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
136
|
+
// Datepicker
|
|
137
|
+
export interface DatePickerChangeEvent {
|
|
138
|
+
target: {
|
|
139
|
+
name: string;
|
|
140
|
+
value: string;
|
|
141
|
+
};
|
|
75
142
|
}
|
|
76
|
-
export const Table: React.ComponentType<TableProps>;
|
|
77
143
|
|
|
78
|
-
|
|
79
|
-
|
|
144
|
+
export interface DatePickerProps
|
|
145
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
146
|
+
initialDate?: string;
|
|
147
|
+
label?: string;
|
|
148
|
+
isValid?: boolean;
|
|
149
|
+
errorMessage?: string;
|
|
80
150
|
name?: string;
|
|
151
|
+
onChange?: (event: DatePickerChangeEvent) => void;
|
|
81
152
|
value?: string;
|
|
82
|
-
options?: { label: string; value: string }[];
|
|
83
|
-
onChange?: (event: any) => void;
|
|
84
153
|
className?: string;
|
|
85
|
-
|
|
154
|
+
title?: string;
|
|
155
|
+
required?: boolean;
|
|
156
|
+
dataCy?: string;
|
|
157
|
+
disabled?: boolean;
|
|
86
158
|
}
|
|
87
|
-
export const Dropdown: React.ComponentType<DropdownProps>;
|
|
88
159
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
160
|
+
export const DatePicker: React.ComponentType<DatePickerProps>;
|
|
161
|
+
|
|
162
|
+
// Dropdown
|
|
163
|
+
export interface DropdownItem {
|
|
164
|
+
label: string;
|
|
165
|
+
value: string | number;
|
|
93
166
|
}
|
|
94
|
-
export const Navbar: React.ComponentType<NavbarProps>;
|
|
95
167
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
title?: string;
|
|
102
|
-
className?: string;
|
|
168
|
+
export interface DropdownChangeEvent {
|
|
169
|
+
target: {
|
|
170
|
+
name: string;
|
|
171
|
+
value: string | number;
|
|
172
|
+
};
|
|
103
173
|
}
|
|
104
|
-
export const Modal: React.ComponentType<ModalProps>;
|
|
105
174
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
175
|
+
export type IconComponent = (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
|
|
176
|
+
|
|
177
|
+
export interface DropdownProps
|
|
178
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
179
|
+
items?: DropdownItem[];
|
|
180
|
+
label?: string;
|
|
181
|
+
isValid?: boolean;
|
|
182
|
+
required?: boolean;
|
|
183
|
+
placeholder?: string;
|
|
184
|
+
name?: string;
|
|
109
185
|
className?: string;
|
|
186
|
+
title?: string;
|
|
187
|
+
tabIndex?: string | number;
|
|
188
|
+
onChange?: (event: DropdownChangeEvent) => void;
|
|
189
|
+
value?: string | number;
|
|
190
|
+
Icon?: IconComponent;
|
|
191
|
+
errorMessage?: string;
|
|
192
|
+
disabled?: boolean;
|
|
193
|
+
dataCy?: string;
|
|
110
194
|
}
|
|
111
|
-
export const Loader: React.ComponentType<LoaderProps>;
|
|
112
195
|
|
|
113
|
-
|
|
114
|
-
|
|
196
|
+
export const Dropdown: React.ComponentType<DropdownProps>;
|
|
197
|
+
|
|
198
|
+
// Input
|
|
199
|
+
export type IconComponent = (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
|
|
200
|
+
|
|
201
|
+
export type CustomComponent = (props: any) => JSX.Element;
|
|
202
|
+
|
|
203
|
+
export interface InputProps
|
|
204
|
+
extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
115
205
|
label: string;
|
|
116
|
-
|
|
206
|
+
placeholder?: string;
|
|
207
|
+
type?:
|
|
208
|
+
| "text"
|
|
209
|
+
| "email"
|
|
210
|
+
| "password"
|
|
211
|
+
| "number"
|
|
212
|
+
| "search"
|
|
213
|
+
| "tel"
|
|
214
|
+
| "url"
|
|
215
|
+
| "date"
|
|
216
|
+
| "datetime-local"
|
|
217
|
+
| "month"
|
|
218
|
+
| "time"
|
|
219
|
+
| "week"
|
|
220
|
+
| string;
|
|
221
|
+
tabIndex?: string | number;
|
|
222
|
+
title?: string;
|
|
223
|
+
name?: string;
|
|
224
|
+
isValid?: boolean;
|
|
225
|
+
errorMessage?: string;
|
|
226
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
117
227
|
className?: string;
|
|
228
|
+
value?: string | number;
|
|
229
|
+
Icon?: IconComponent;
|
|
230
|
+
iconPosition?: "left" | "right";
|
|
231
|
+
isAnimated?: boolean;
|
|
232
|
+
required?: boolean;
|
|
233
|
+
disabled?: boolean;
|
|
234
|
+
shouldRenderCustomComponent?: boolean;
|
|
235
|
+
customComponent?: CustomComponent;
|
|
236
|
+
customComponentProps?: Record<string, any>;
|
|
237
|
+
dataCy?: string;
|
|
118
238
|
}
|
|
119
|
-
export const Pill: React.ComponentType<PillProps>;
|
|
120
239
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
240
|
+
export const Input: React.ForwardRefExoticComponent<
|
|
241
|
+
InputProps & React.RefAttributes<HTMLInputElement>
|
|
242
|
+
>;
|
|
243
|
+
|
|
244
|
+
// Radios
|
|
245
|
+
export interface RadioOption {
|
|
246
|
+
value: string | number;
|
|
247
|
+
label: string;
|
|
128
248
|
}
|
|
129
|
-
export const CookieBanner: React.ComponentType<CookieBannerProps>;
|
|
130
249
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
className?: string;
|
|
250
|
+
export interface RadioChangeEvent {
|
|
251
|
+
target: {
|
|
252
|
+
name: string;
|
|
253
|
+
value: string | number;
|
|
254
|
+
};
|
|
137
255
|
}
|
|
138
|
-
export const Text: React.ComponentType<TextProps>;
|
|
139
256
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
257
|
+
export interface RadioButtonProps
|
|
258
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
259
|
+
label: string;
|
|
260
|
+
options?: RadioOption[];
|
|
261
|
+
name: string;
|
|
262
|
+
value?: string | number;
|
|
263
|
+
onChange?: (event: RadioChangeEvent) => void;
|
|
264
|
+
className?: string;
|
|
265
|
+
tabIndex?: string | number;
|
|
266
|
+
title?: string;
|
|
267
|
+
isValid?: boolean;
|
|
268
|
+
errorMessage?: string;
|
|
269
|
+
required?: boolean;
|
|
270
|
+
dataCy?: string;
|
|
271
|
+
disabled?: boolean;
|
|
145
272
|
}
|
|
146
|
-
|
|
273
|
+
|
|
274
|
+
export const RadioButton: React.FC<RadioButtonProps>;
|
|
147
275
|
|
|
148
276
|
// Header
|
|
149
|
-
export interface HeaderProps {
|
|
150
|
-
title
|
|
151
|
-
|
|
277
|
+
export interface HeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
278
|
+
title: string;
|
|
279
|
+
center?: React.ReactNode;
|
|
280
|
+
right?: React.ReactNode;
|
|
152
281
|
className?: string;
|
|
153
282
|
}
|
|
154
|
-
|
|
283
|
+
|
|
284
|
+
export const Header: React.FC<HeaderProps>;
|
|
155
285
|
|
|
156
286
|
// Icon
|
|
157
|
-
export
|
|
158
|
-
|
|
159
|
-
|
|
287
|
+
export type HeroIconName = keyof typeof HeroIcons;
|
|
288
|
+
export type C247IconName = keyof typeof C247Icons;
|
|
289
|
+
export type IconName = HeroIconName | C247IconName;
|
|
290
|
+
|
|
291
|
+
export type IconLibrary = "hero" | "c247";
|
|
292
|
+
|
|
293
|
+
export interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
294
|
+
name: IconName;
|
|
295
|
+
library?: IconLibrary;
|
|
296
|
+
size?: number;
|
|
160
297
|
className?: string;
|
|
298
|
+
color?: string;
|
|
161
299
|
}
|
|
162
|
-
export const Icon: React.ComponentType<IconProps>;
|
|
163
300
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
301
|
+
export const Icon: React.FC<IconProps>;
|
|
302
|
+
|
|
303
|
+
// Loader
|
|
304
|
+
export interface LoaderProps {
|
|
305
|
+
isLoading: boolean;
|
|
306
|
+
loaderText?: string;
|
|
307
|
+
customLoader?: React.ReactNode;
|
|
169
308
|
className?: string;
|
|
170
309
|
}
|
|
171
|
-
export const Footer: React.ComponentType<FooterProps>;
|
|
172
310
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
311
|
+
export const Loader: React.FC<LoaderProps>;
|
|
312
|
+
|
|
313
|
+
// Modal
|
|
314
|
+
export interface ModalProps {
|
|
315
|
+
isOpen: boolean;
|
|
316
|
+
onClose?: () => void;
|
|
317
|
+
isLoading?: boolean;
|
|
318
|
+
loaderText?: string;
|
|
319
|
+
header?: React.ReactNode;
|
|
320
|
+
hideHeader?: boolean;
|
|
321
|
+
body?: React.ReactNode;
|
|
322
|
+
footer?: React.ReactNode;
|
|
323
|
+
hideFooter?: boolean;
|
|
178
324
|
className?: string;
|
|
325
|
+
footerClassName?: string;
|
|
326
|
+
headerClassName?: string;
|
|
179
327
|
}
|
|
180
|
-
|
|
328
|
+
|
|
329
|
+
export const Modal: React.FC<ModalProps>;
|
|
330
|
+
|
|
331
|
+
// Navbar
|
|
332
|
+
export interface NavbarProps {
|
|
333
|
+
children?: React.ReactNode;
|
|
334
|
+
logo?: string;
|
|
335
|
+
className?: string;
|
|
336
|
+
maxWidth?: string;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export const Navbar: React.FC<NavbarProps>;
|
|
181
340
|
|
|
182
341
|
// PageTemplate
|
|
183
342
|
export interface PageTemplateProps {
|
|
184
343
|
headerTitle?: string;
|
|
185
|
-
headerLeft?: React.ReactNode;
|
|
186
344
|
headerCenter?: React.ReactNode;
|
|
187
345
|
headerRight?: React.ReactNode;
|
|
188
346
|
|
|
@@ -190,17 +348,116 @@ declare module "opus-toolkit-components" {
|
|
|
190
348
|
footerCenter?: React.ReactNode;
|
|
191
349
|
footerRight?: React.ReactNode;
|
|
192
350
|
|
|
193
|
-
children
|
|
351
|
+
children: React.ReactNode;
|
|
194
352
|
className?: string;
|
|
195
353
|
}
|
|
196
|
-
|
|
354
|
+
|
|
355
|
+
export const PageTemplate: React.FC<PageTemplateProps>;
|
|
356
|
+
|
|
357
|
+
// Pills
|
|
358
|
+
export interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
359
|
+
text?: string;
|
|
360
|
+
status?: 'primary' | 'danger' | 'warning' | 'success' | 'info' | 'notice';
|
|
361
|
+
className?: string;
|
|
362
|
+
icon?: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export const Pill: React.FC<PillProps>;
|
|
197
366
|
|
|
198
367
|
// ProfileCard
|
|
199
|
-
export interface
|
|
368
|
+
export interface ProfileCardUser {
|
|
369
|
+
name: string;
|
|
370
|
+
role: string;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export interface ProfileCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
374
|
+
user: ProfileCardUser;
|
|
375
|
+
href?: string;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export const ProfileCard: React.FC<ProfileCardProps>;
|
|
379
|
+
|
|
380
|
+
// Sidebar
|
|
381
|
+
export interface SidebarMenuItem {
|
|
382
|
+
key: string | number;
|
|
383
|
+
name: string;
|
|
384
|
+
icon?: string;
|
|
385
|
+
href?: string;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export interface SidebarMenuGroup {
|
|
389
|
+
key: string | number;
|
|
200
390
|
name: string;
|
|
201
|
-
|
|
202
|
-
|
|
391
|
+
children: SidebarMenuItem[];
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export type SidebarMenu = SidebarMenuItem | SidebarMenuGroup;
|
|
395
|
+
|
|
396
|
+
export interface SidebarUser {
|
|
397
|
+
id: string | number;
|
|
398
|
+
name: string;
|
|
399
|
+
role: string;
|
|
400
|
+
avatar?: string;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
404
|
+
menus: SidebarMenu[];
|
|
405
|
+
user: SidebarUser;
|
|
406
|
+
activeItem?: string | number | null;
|
|
407
|
+
onItemClick?: (key: string | number) => void;
|
|
408
|
+
logo?: string;
|
|
409
|
+
searchValue?: string;
|
|
410
|
+
onSearchChange?: (value: string) => void;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export const Sidebar: React.FC<SidebarProps>;
|
|
414
|
+
|
|
415
|
+
// Table
|
|
416
|
+
export interface TableColumn {
|
|
417
|
+
key: string;
|
|
418
|
+
header: string;
|
|
419
|
+
render?: (row: any) => React.ReactNode;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export interface TableProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
423
|
+
data?: TableColumn[];
|
|
424
|
+
rows?: any[];
|
|
203
425
|
className?: string;
|
|
426
|
+
rowClassName?: string;
|
|
427
|
+
cellClassName?: string;
|
|
428
|
+
headRowClassName?: string;
|
|
429
|
+
headCellClassName?: string;
|
|
430
|
+
rowKeyExtractor?: (row: any, index: number) => string | number;
|
|
204
431
|
}
|
|
205
|
-
|
|
206
|
-
|
|
432
|
+
|
|
433
|
+
export const Table: React.FC<TableProps>;
|
|
434
|
+
|
|
435
|
+
// Text
|
|
436
|
+
export type TextVariant =
|
|
437
|
+
| "h1"
|
|
438
|
+
| "h2"
|
|
439
|
+
| "h3"
|
|
440
|
+
| "h4"
|
|
441
|
+
| "h5"
|
|
442
|
+
| "h6"
|
|
443
|
+
| "body"
|
|
444
|
+
| "small"
|
|
445
|
+
| "caption"
|
|
446
|
+
| "label";
|
|
447
|
+
|
|
448
|
+
export type TextAs = keyof JSX.IntrinsicElements | React.ComponentType<any>;
|
|
449
|
+
|
|
450
|
+
export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
451
|
+
variant?: TextVariant;
|
|
452
|
+
as?: TextAs;
|
|
453
|
+
className?: string;
|
|
454
|
+
color?: string;
|
|
455
|
+
children?: React.ReactNode;
|
|
456
|
+
name?: string;
|
|
457
|
+
dataCy?: string;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export const Text: React.FC<TextProps>;
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
}
|