Skip to content

Commit

Permalink
Merge pull request #47 from grapp-dev/fix/row-column-from-signature
Browse files Browse the repository at this point in the history
fix: improve `Row.from` and `Column.from` type signatures
  • Loading branch information
mobily committed Apr 9, 2024
2 parents 7422935 + 3c4e5c5 commit 3c3741e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const markAsColumn = (node: React.FC) => {
node.__isColumn__ = true;
};

const from = <T extends React.ComponentProps<typeof Column>>(Component: React.FC<T>) => {
const from = <T extends React.FC<any>>(Component: T) => {
// @ts-expect-error: this_is_fine.png
Component.__isColumnForwarded__ = true;
return Component;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const markAsRow = (node: React.FC) => {
node.__isRow__ = true;
};

const from = <T extends React.ComponentProps<typeof Row>>(Component: React.FC<T>) => {
const from = <T extends React.FC<any>>(Component: T) => {
// @ts-expect-error: this_is_fine.png
Component.__isRowForwarded__ = true;
return Component;
Expand Down

0 comments on commit 3c3741e

Please sign in to comment.