Skip to content

Commit

Permalink
fix: don't pass RJSF uiSchema to Button
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcur committed Jan 24, 2024
1 parent f6e7c70 commit 6371a10
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function buttonTemplates<
>(): TemplatesType<T, S, F>["ButtonTemplates"] {
return {
SubmitButton: (props) => <Button {...props}>Submit</Button>,
AddButton: (props) => (
AddButton: ({ uiSchema: _, ...props }) => (
/* a bit hacky to specify the style here */
<Button
{...props}
Expand All @@ -25,22 +25,22 @@ function buttonTemplates<
<Icon name="add" />
</Button>
),
CopyButton: (props) => (
CopyButton: ({ uiSchema: _, ...props }) => (
<Button {...props} leftAdornment="+">
Add
</Button>
),
MoveDownButton: (props) => (
MoveDownButton: ({ uiSchema: _, ...props }) => (
<Button {...props} size="small" variant="muted">
<Icon name="arrow down" />
</Button>
),
MoveUpButton: (props) => (
MoveUpButton: ({ uiSchema: _, ...props }) => (
<Button {...props} size="small" variant="muted">
<Icon name="arrow up" />
</Button>
),
RemoveButton: (props) => (
RemoveButton: ({ uiSchema: _, ...props }) => (
<Button {...props} size="small" variant="muted">
<Icon name="delete" />
</Button>
Expand Down

0 comments on commit 6371a10

Please sign in to comment.