Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
πŸ› Forgot to actually use the forwarded ref
Browse files Browse the repository at this point in the history
  • Loading branch information
lowiebenoot committed Nov 6, 2023
1 parent c69aa19 commit c3e63d3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/components/grid/GridItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ import { GenericComponent } from '../../@types/types';

export type GridItemProps = Partial<{ children: ReactNode; area: string }>;

const GridItem: GenericComponent<GridItemProps> = forwardRef<HTMLDivElement, GridItemProps>(({ children, area }) => {
const gridItemStyles = { gridArea: area };
const GridItem: GenericComponent<GridItemProps> = forwardRef<HTMLDivElement, GridItemProps>(
({ children, area }, ref) => {
const gridItemStyles = { gridArea: area };

return <div style={gridItemStyles}>{children}</div>;
});
return (
<div style={gridItemStyles} ref={ref}>
{children}
</div>
);
},
);

GridItem.displayName = 'Grid';

Expand Down

0 comments on commit c3e63d3

Please sign in to comment.