Renamed folder
This commit is contained in:
parent
b1e7d2d49a
commit
2061ef6f02
2 changed files with 0 additions and 0 deletions
17
src/builtin-components/Button/Button.tsx
Normal file
17
src/builtin-components/Button/Button.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import './Button.sass'
|
||||
import { Show } from 'solid-js'
|
||||
|
||||
export default (props: { label?: string; to?: string; onClick?: () => void; }) => {
|
||||
return <>
|
||||
<Show when={props.to}>
|
||||
<a href={props.to} aria-label={props.label}>
|
||||
<button class="button">{props.label || 'Click Me!'}</button>
|
||||
</a>
|
||||
</Show>
|
||||
|
||||
<Show when={!props.to}>
|
||||
<button class="button" onClick={props.onClick}>{props.label || 'Click Me!'}</button>
|
||||
</Show>
|
||||
|
||||
</>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue