feat: improve ui components

This commit is contained in:
2024-01-04 21:46:10 -06:00
parent 0c74c0a0a9
commit 7d39bb3d89
14 changed files with 245 additions and 37 deletions
+20
View File
@@ -0,0 +1,20 @@
import { cx } from '@/styled-system/css'
import { listGroup, type ListGroupVariantProps } from '@/styled-system/recipes/list-group'
import { type MergeOmitting } from '@/types/utilities'
import { type DetailedHTMLProps, type FC, type HTMLAttributes } from 'react'
type ComposedInputProps = MergeOmitting<DetailedHTMLProps<HTMLAttributes<HTMLUListElement>, HTMLUListElement>, ListGroupVariantProps>
const ListGroup: FC<ComposedInputProps> = ({ children, className, ...rest }) => {
const [listGroupRecipeArgs, allOtherListGroupProps] = listGroup.splitVariantProps(rest)
return (
<ul
className={cx(listGroup(listGroupRecipeArgs).root, className)}
{...allOtherListGroupProps}
>
{children}
</ul>
)
}
export default ListGroup