cschroeter / park-ui

Beautifully designed components built with Ark UI and Panda CSS that work with a variety of JS frameworks.
https://park-ui.com
MIT License
1.74k stars 75 forks source link

Button fails to compile on solid #429

Open wighawag opened 2 months ago

wighawag commented 2 months ago

I had to add

  children?: JSX.Element[],
  disabled?: boolean

to the button props definition to make it work, but not sure that's the way to go about it

also add to fix borderColor to border-color

see diff

diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx
index 901d512..8963a9e 100644
--- a/src/components/ui/button.tsx
+++ b/src/components/ui/button.tsx
@@ -6,7 +6,9 @@ import { Button as StyledButton, type ButtonProps as StyledButtonProps } from '.

 interface ButtonLoadingProps {
   loading?: boolean
-  loadingText?: JSX.Element
+  loadingText?: JSX.Element,
+  children?: JSX.Element[],
+  disabled?: boolean
 }

 export interface ButtonProps extends StyledButtonProps, ButtonLoadingProps {}
@@ -32,6 +34,6 @@ export const Button = (props: ButtonProps) => {

 const ButtonSpinner = () => (
   <Center inline position="absolute" transform="translate(-50%, -50%)" top="50%" insetStart="50%">
-    <Spinner borderColor="currentColor" />
+    <Spinner border-color="currentColor" />
   </Center>
 )