Sha256: 69f4ad0f49ab057c97e93907657e20a7a3c35ccf7ee6773c7e5653d27fb5db00
Contents?: true
Size: 1.15 KB
Versions: 20
Compression:
Stored size: 1.15 KB
Contents
import React from 'react' import classnames from 'classnames' import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props' import { globalProps, GlobalProps } from '../utilities/globalProps' type ListItemProps = { aria?: { [key: string]: string }, children: React.ReactNode[] | React.ReactNode, className?: string, data?: Record<string, unknown>, htmlOptions?: {[key: string]: string | number | boolean | (() => void)}, id?: string, tabIndex?: number, } & GlobalProps const ListItem = (props: ListItemProps) => { const { aria = {}, children, className, data = {}, htmlOptions = {}, id, tabIndex, } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const htmlProps = buildHtmlProps(htmlOptions) const classes = classnames( buildCss('pb_item_kit'), globalProps(props), className ) return ( <> <li {...ariaProps} {...dataProps} {...htmlProps} className={classes} id={id} tabIndex={tabIndex} > {children} </li> </> ) } export default ListItem
Version data entries
20 entries across 20 versions & 1 rubygems