Skip to content

Commit

Permalink
fix: Support other button props in extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
areknawo committed May 10, 2024
1 parent c001ce1 commit 43b88ff
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions apps/web/src/lib/extensions/component-renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
on,
onMount,
Show,
splitProps,
Switch
} from "solid-js";
import { marked } from "marked";
Expand Down Expand Up @@ -78,16 +79,13 @@ const baseComponents = {
);
},
Button: (props: RenderedComponentProps<ComponentProps<typeof Button>>) => {
const [, passedProps] = splitProps(props, ["children"]);

return (
<Button
variant={props.variant}
color={props.color}
onClick={props.onClick}
class={props.class}
text={props.text}
{...passedProps}
disabled={"disabled" in props ? props.disabled : false}
loading={"loading" in props ? props.loading : false}
contentEditable={props.contentEditable}
>
{props.children}
</Button>
Expand Down

0 comments on commit 43b88ff

Please sign in to comment.