Added input component

This commit is contained in:
Patrick Alvin Alcala 2025-09-02 14:36:29 +08:00
parent 6bae38e1ca
commit dd214ebdd9
2 changed files with 40 additions and 0 deletions

View file

@ -1,3 +1,27 @@
.input .input
font-size: 1rem font-size: 1rem
padding: 0.5rem 1rem padding: 0.5rem 1rem
width: 100%
border: 2px solid #ccc
border-radius: 4px
outline: none
transition: border-color 0.3s, box-shadow 0.3s
&:focus
border-color: #3377AC
box-shadow: 0 0 5px rgba(51, 119, 168, 0.3)
&::placeholder
color: #888
font-style: italic
&:disabled
background-color: #f0f0f0
border-color: #ddd
&--error
border-color: #ff4d4f
box-shadow: 0 0 5px rgba(255, 77, 79, 0.3)
&:focus
border-color: #e81123

View file

@ -0,0 +1,16 @@
import Input from '../../../fwt/components/Input/Input'
import { createSignal } from 'solid-js'
import Column from '../../../fwt/components/Column/Column'
const [sample, setSample] = createSignal('')
export default () => {
return (
<>
<Column content="center">
<Input onChange={(val) => setSample(val)}></Input>
<span>{sample()}</span>
</Column>
</>
)
}