Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
evadecker committed Nov 26, 2024
1 parent f8fb143 commit bbaf3b9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function Checkbox(props: CheckboxProps) {
) : null}
</div>
{props.label}
{props.children}
{renderProps.defaultChildren}
</>
)}
</AriaCheckbox>
Expand Down
9 changes: 7 additions & 2 deletions src/components/GridList/GridList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,19 @@ export function GridListItem({
{...props}
className={composeTailwindRenderProps(className, itemStyles())}
>
{({ selectionMode, selectionBehavior, allowsDragging }) => (
{({
selectionMode,
selectionBehavior,
allowsDragging,
defaultChildren,
}) => (
<>
{/* Add elements for drag and drop and selection. */}
{allowsDragging && <Button slot="drag"></Button>}
{selectionMode === "multiple" && selectionBehavior === "toggle" && (
<Checkbox slot="selection" />
)}
{children}
{defaultChildren}
</>
)}
</AriaGridListItem>
Expand Down
2 changes: 1 addition & 1 deletion src/components/RadioGroup/RadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function Radio(props: RadioProps) {
{(renderProps) => (
<>
<div className={styles(renderProps)} />
{props.children}
{renderProps.defaultChildren}
</>
)}
</AriaRadio>
Expand Down
4 changes: 2 additions & 2 deletions src/components/TagGroup/TagGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ export function Tag({ children, ...props }: TagProps) {
tagStyles({ ...renderProps, className }),
)}
>
{({ allowsRemoving }) => (
{({ defaultChildren, allowsRemoving }) => (
<>
{children}
{defaultChildren}
{allowsRemoving && (
<Button slot="remove" className={removeButtonStyles}>
<X aria-hidden className="w-3 h-3" />
Expand Down

0 comments on commit bbaf3b9

Please sign in to comment.