sw-ui-controls
v2.1.8
Published
SW UI controls for rapid development
Downloads
1,082
Maintainers
Readme
sw-ui-controls
SW UI controls for rapid development
Install
npm install --save sw-ui-controls
Usage
import React, { Component } from 'react'
import { Button, Input } from 'sw-ui-controls'
import 'sw-ui-controls/dist/index.css'
import 'sw-ui-controls/dist/style.css'
const UserForm = () => {
const [name, setName] = useState('')
const handleSubmit = () => {}
return (
<div>
<form onSubmit={handleSubmit}>
<Input
value={name}
label='Name'
onChange={(e) => setName(e.target.value)}
ref={ref}
pattern='[a-z]+'
required
min={4}
max={10}
minLength={5}
maxLength={10}
type='password'
/>
<Button type='submit'>Submit</Button>
</form>
</div>
)
}
License
MIT © ssw1994