Added input component
This commit is contained in:
parent
6bae38e1ca
commit
dd214ebdd9
2 changed files with 40 additions and 0 deletions
|
|
@ -1,3 +1,27 @@
|
|||
.input
|
||||
font-size: 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
|
||||
|
|
|
|||
16
src/components/Input/Input.tsx
Normal file
16
src/components/Input/Input.tsx
Normal 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>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue