@@ -66,7 +66,7 @@ const are = (
66
66
) : Extract < Bulma , `are-${typeof arg } `> | undefined =>
67
67
arg ? `are-${ arg } ` : undefined
68
68
69
- export const is = (
69
+ const is = (
70
70
arg : Color | ColorVariant | Size | undefined ,
71
71
) : Extract < Bulma , `is-${typeof arg } `> | undefined =>
72
72
arg ? `is-${ arg } ` : undefined
@@ -86,6 +86,18 @@ export const A: FC<PropsWithChildren<AProps>> = ({
86
86
)
87
87
export type AProps = AnchorHTMLAttributes < HTMLAnchorElement > & BulmaProp
88
88
89
+ export const Article : FC < PropsWithChildren < NavProps > > = ( {
90
+ bulma,
91
+ className,
92
+ children,
93
+ ...props
94
+ } ) => (
95
+ < article className = { classnames < Bulma > ( className as Bulma , bulma ) } { ...props } >
96
+ { children }
97
+ </ article >
98
+ )
99
+ export type ArticleProps = HTMLAttributes < HTMLElement > & BulmaProp
100
+
89
101
/**
90
102
* A breadcrumb component to improve navigation experience.
91
103
*
@@ -609,8 +621,7 @@ export const Delete: FC<DeleteProps> = ({
609
621
{ ...props }
610
622
/>
611
623
)
612
- export type DeleteProps = ButtonHTMLAttributes < HTMLButtonElement > &
613
- SizeProp < "large" >
624
+ export type DeleteProps = ButtonHTMLAttributes < HTMLButtonElement > & SizeProp
614
625
615
626
export const Div : FC < PropsWithChildren < DivProps > > = ( {
616
627
bulma,
@@ -1051,9 +1062,9 @@ export type HeroHeadProps = HTMLAttributes<HTMLDivElement> & BulmaProp
1051
1062
* @example
1052
1063
*
1053
1064
* ```tsx
1054
- * <Icon>
1055
- * <i className="fas fa-home"></i>
1056
- * </Icon>
1065
+ * <Icon>
1066
+ * <i className="fas fa-home"></i>
1067
+ * </Icon>
1057
1068
* ```
1058
1069
*
1059
1070
* @see [bulma docs](https://bulma.io/documentation/elements/icon/).
@@ -1552,6 +1563,18 @@ export const ModalContent: FC<PropsWithChildren<ModalContentProps>> = ({
1552
1563
)
1553
1564
export type ModalContentProps = HTMLAttributes < HTMLDivElement > & BulmaProp
1554
1565
1566
+ export const Nav : FC < PropsWithChildren < NavProps > > = ( {
1567
+ bulma,
1568
+ className,
1569
+ children,
1570
+ ...props
1571
+ } ) => (
1572
+ < nav className = { classnames < Bulma > ( className as Bulma , bulma ) } { ...props } >
1573
+ { children }
1574
+ </ nav >
1575
+ )
1576
+ export type NavProps = HTMLAttributes < HTMLElement > & BulmaProp
1577
+
1555
1578
/**
1556
1579
* A responsive horizontal navbar that can support images, links, buttons, and dropdowns.
1557
1580
*
@@ -2273,6 +2296,122 @@ export type TabProps = AnchorHTMLAttributes<HTMLAnchorElement> &
2273
2296
isActive : boolean
2274
2297
} >
2275
2298
2299
+ /**
2300
+ * Small tag labels to insert anywhere.
2301
+ *
2302
+ * @example
2303
+ *
2304
+ * ```tsx
2305
+ * <Tag color="primary" variant="light">
2306
+ * v1.0.0
2307
+ * </Tag>
2308
+ * ```
2309
+ *
2310
+ * @example Append a delete button.
2311
+ *
2312
+ * ```tsx
2313
+ * <Tag color="warning" size="medium">
2314
+ * Hello
2315
+ * <Delete size="small" />
2316
+ * </Tag>
2317
+ * ```
2318
+ *
2319
+ * @see [bulma docs](https://bulma.io/documentation/elements/tag/).
2320
+ */
2321
+ export const Tag : FC < PropsWithChildren < TagProps > > = ( {
2322
+ color,
2323
+ variant,
2324
+ isHoverable,
2325
+ isRounded,
2326
+ size,
2327
+ bulma,
2328
+ className,
2329
+ children,
2330
+ ...props
2331
+ } ) => (
2332
+ < span
2333
+ className = { classnames < Bulma > (
2334
+ className as Bulma ,
2335
+ "tag" ,
2336
+ is ( color ) ,
2337
+ is ( variant ) ,
2338
+ is ( size ) ,
2339
+ {
2340
+ "is-hoverable" : isHoverable ,
2341
+ "is-rounded" : isRounded ,
2342
+ } ,
2343
+ bulma ,
2344
+ ) }
2345
+ { ...props }
2346
+ >
2347
+ { children }
2348
+ </ span >
2349
+ )
2350
+ export type TagProps = HTMLAttributes < HTMLSpanElement > &
2351
+ BulmaProp &
2352
+ ColorProp &
2353
+ ColorVariantProp < "light" > &
2354
+ SizeProp < "medium" | "large" > &
2355
+ Partial < {
2356
+ isHoverable : boolean
2357
+ isRounded : boolean
2358
+ } >
2359
+
2360
+ /**
2361
+ * List of tags.
2362
+ *
2363
+ * @example Size.
2364
+ *
2365
+ * ```tsx
2366
+ * <Tags size="large">
2367
+ * <Tag>All</Tag>
2368
+ * <Tag>Medium</Tag>
2369
+ * <Tag>Size</Tag>
2370
+ * </Tags>
2371
+ * ```
2372
+ *
2373
+ * @example Attach tags together.
2374
+ *
2375
+ * ```tsx
2376
+ * <Tags hasAddons>
2377
+ * <Tag>package</Tag>
2378
+ * <Tag color="primary">trunx</Tag>
2379
+ * </Tags>
2380
+ * ```
2381
+ *
2382
+ * @example Attach a text tag with a delete tag together.
2383
+ *
2384
+ * ```tsx
2385
+ * <Tags hasAddons>
2386
+ * <Tag color="danger">Alex Smith</Tag>
2387
+ * <a class="tag is-delete" />
2388
+ * </Tags>
2389
+ * ```
2390
+ *
2391
+ * @see [bulma docs](https://bulma.io/documentation/elements/tag/#list-of-tags)
2392
+ */
2393
+ export const Tags : FC < PropsWithChildren < TagsProps > > = ( {
2394
+ hasAddons,
2395
+ size,
2396
+ className,
2397
+ children,
2398
+ ...props
2399
+ } ) => (
2400
+ < div
2401
+ className = { classnames < Bulma > ( className as Bulma , "tags" , are ( size ) , {
2402
+ "has-addons" : hasAddons ,
2403
+ } ) }
2404
+ { ...props }
2405
+ >
2406
+ { children }
2407
+ </ div >
2408
+ )
2409
+ export type TagsProps = HTMLAttributes < HTMLDivElement > &
2410
+ PluralSizeProp &
2411
+ Partial < {
2412
+ hasAddons : boolean
2413
+ } >
2414
+
2276
2415
/**
2277
2416
* The multiline textarea and its variations.
2278
2417
*
0 commit comments