Skip to content

Commit

Permalink
typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-fidd committed Jan 21, 2025
1 parent 6e7b667 commit e2c0fe9
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React, {
type ComponentPropsWithoutRef,
type ReactNode,
type CSSProperties,
Children,
} from 'react';

import { styles } from '../../style';
Expand Down Expand Up @@ -45,7 +44,7 @@ export function CellValue<
const { fullSheetName } = useSheetName(binding);
const sheetValue = useSheetValue(binding);

return children && Children.toArray(children).length ? (
return typeof children === 'function' ? (
<>{children({ type, name: fullSheetName, value: sheetValue })}</>
) : (
<CellValueText
Expand Down

0 comments on commit e2c0fe9

Please sign in to comment.