Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Let Grid and Grid Cell render any structural tag #1662

Merged
merged 5 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve typing of polymorphic refs
  • Loading branch information
VincentSmedinga committed Nov 8, 2024
commit e36ba8bd108344dc00fb00f0859fdb5087dc0b31
5 changes: 3 additions & 2 deletions packages/react/src/Breakout/BreakoutCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
* @license EUPL-1.2+
* Copyright Gemeente Amsterdam
*/

import clsx from 'clsx'
import { forwardRef } from 'react'
import type { HTMLAttributes, PropsWithChildren } from 'react'
import type { ForwardedRef, HTMLAttributes, PropsWithChildren } from 'react'
import type { BreakoutRowNumber, BreakoutRowNumbers } from './Breakout'
import { breakoutCellClasses } from './breakoutCellClasses'
import type { GridColumnNumber, GridColumnNumbers } from '../Grid/Grid'
Expand Down Expand Up @@ -54,7 +55,7 @@ export const BreakoutCell = forwardRef(
rowStart,
...restProps
}: BreakoutCellProps,
ref: any,
ref: ForwardedRef<any>,
) => (
<Tag
{...restProps}
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Grid/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import clsx from 'clsx'
import { forwardRef } from 'react'
import type { HTMLAttributes, PropsWithChildren } from 'react'
import type { ForwardedRef, HTMLAttributes, PropsWithChildren } from 'react'
import { GridCell } from './GridCell'
import { paddingClasses } from './paddingClasses'

Expand Down Expand Up @@ -55,7 +55,7 @@ const GridRoot = forwardRef(
paddingVertical,
...restProps
}: GridProps,
ref: any,
ref: ForwardedRef<any>,
) => (
<Tag
{...restProps}
Expand Down