SolidJSS
SolidJSโ€ข3y agoโ€ข
8 replies
mtctx

Components Props and Text

Hey mates!
I need to know 2 things

1. How can I add required props?
2. How can I add text to a Component like in the Example?

example:
//Component
export default function Button(props: ButtonProps) {
    return (
        <>
            <button class={getStyle(props.type)}></button>
        </>
    );
}

//Site
<Button>Test</Button>
Was this page helpful?