Compare commits

..

3 commits

7 changed files with 39 additions and 9 deletions

View file

@ -1,7 +1,8 @@
import type { JSXElement } from 'solid-js'
import './Column.sass'
interface Props {
children: any
children: JSXElement
content: 'top' | 'center' | 'right' | 'split' | 'spaced'
gap?: number
}

View file

@ -1,7 +1,8 @@
import './Footer.sass'
import type { JSXElement } from 'solid-js'
interface Props {
children: any
children: JSXElement
}
export default (props: Props) => {

View file

@ -4,7 +4,7 @@ interface Props {
title: string
name: string
description: string
children: any
children: HTMLElement
font?: string
}

View file

@ -0,0 +1,3 @@
.input
font-size: 1rem
padding: 0.5rem 1rem

View file

@ -0,0 +1,27 @@
import './Input.sass'
import { createSignal } from 'solid-js'
interface Props {
placeholder?: string
value?: string
onChange?: (value: string) => void
}
export default (props: Props) => {
const [inputValue, setInputValue] = createSignal(props.value || '')
const handleChange = (event: Event) => {
const target = event.target as HTMLInputElement
const newValue = target.value
setInputValue(newValue)
if (props.onChange) {
props.onChange(newValue)
}
}
return (
<>
<input class="input" type="text" placeholder={props.placeholder} value={inputValue()} onInput={handleChange} />
</>
)
}

View file

@ -4,7 +4,7 @@ import Row from '../Row/Row'
interface Props {
transparent?: boolean
children: any
children: HTMLElement
}
export default (props: Props) => {

View file

@ -1,8 +1,8 @@
import './Row.sass'
import { Show } from 'solid-js'
import { Show, type JSXElement } from 'solid-js'
interface Props {
children: any
children: JSXElement
content: 'left' | 'center' | 'right' | 'split' | 'spaced' | 'even'
gap?: number
}
@ -17,9 +17,7 @@ export default (props: Props) => {
</Show>
<Show when={!props.gap}>
<div class={props.content} >
{props.children}
</div>
<div class={props.content}>{props.children}</div>
</Show>
</>
)