diff options
Diffstat (limited to 'src/components/molecules/grid/grid-item.tsx')
| -rw-r--r-- | src/components/molecules/grid/grid-item.tsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/components/molecules/grid/grid-item.tsx b/src/components/molecules/grid/grid-item.tsx new file mode 100644 index 0000000..0592cec --- /dev/null +++ b/src/components/molecules/grid/grid-item.tsx @@ -0,0 +1,15 @@ +import { type ForwardRefRenderFunction, forwardRef } from 'react'; +import { ListItem, type ListItemProps } from '../../atoms'; + +export type GridItemProps = ListItemProps; + +const GridItemWithRef: ForwardRefRenderFunction< + HTMLLIElement, + GridItemProps +> = ({ children, ...props }, ref) => ( + <ListItem {...props} ref={ref}> + {children} + </ListItem> +); + +export const GridItem = forwardRef(GridItemWithRef); |
