Compare commits
3 commits
608cef5827
...
7a9cd4b4bf
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a9cd4b4bf | |||
| 69818aaf6d | |||
| 4774e8b51f |
7 changed files with 39 additions and 9 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
|
import type { JSXElement } from 'solid-js'
|
||||||
import './Column.sass'
|
import './Column.sass'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children: any
|
children: JSXElement
|
||||||
content: 'top' | 'center' | 'right' | 'split' | 'spaced'
|
content: 'top' | 'center' | 'right' | 'split' | 'spaced'
|
||||||
gap?: number
|
gap?: number
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
import './Footer.sass'
|
import './Footer.sass'
|
||||||
|
import type { JSXElement } from 'solid-js'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children: any
|
children: JSXElement
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (props: Props) => {
|
export default (props: Props) => {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ interface Props {
|
||||||
title: string
|
title: string
|
||||||
name: string
|
name: string
|
||||||
description: string
|
description: string
|
||||||
children: any
|
children: HTMLElement
|
||||||
font?: string
|
font?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
3
fwt/components/Input/Input.sass
Normal file
3
fwt/components/Input/Input.sass
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
.input
|
||||||
|
font-size: 1rem
|
||||||
|
padding: 0.5rem 1rem
|
||||||
27
fwt/components/Input/Input.tsx
Normal file
27
fwt/components/Input/Input.tsx
Normal 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} />
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ import Row from '../Row/Row'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
transparent?: boolean
|
transparent?: boolean
|
||||||
children: any
|
children: HTMLElement
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (props: Props) => {
|
export default (props: Props) => {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import './Row.sass'
|
import './Row.sass'
|
||||||
import { Show } from 'solid-js'
|
import { Show, type JSXElement } from 'solid-js'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children: any
|
children: JSXElement
|
||||||
content: 'left' | 'center' | 'right' | 'split' | 'spaced' | 'even'
|
content: 'left' | 'center' | 'right' | 'split' | 'spaced' | 'even'
|
||||||
gap?: number
|
gap?: number
|
||||||
}
|
}
|
||||||
|
|
@ -17,9 +17,7 @@ export default (props: Props) => {
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
<Show when={!props.gap}>
|
<Show when={!props.gap}>
|
||||||
<div class={props.content} >
|
<div class={props.content}>{props.children}</div>
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
</Show>
|
</Show>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue