3.0.2 • Published 2 years ago
nekohack-ui v3.0.2
nekohack-ui
Installation
Install nekohack-ui package.
npm i nekohack-ui
npm i react react-dom styled-components
yarn add nekohack-ui
yarn add react react-dom styled-components
Atomic Components
Button
import * as React from 'react'
import { Button as NekoButton } from '../components/button'
export const App = () => {
const submit = () => {
//
}
return (
<NekoButton onClick={submit}>Button</NekoButton>
)
}
Props
# | Type | Default |
---|---|---|
children | React.ReactNode |
|
onClick | Function |
|
Input
import * as React from 'react'
import { Input as NekoInput } from '../components/input'
export const App = () => {
const [value, setValue] = React.useState('Input')
return (
<NekoInput value={value} onChange={setValue} />
)
}
Props
# | Type | Default |
---|---|---|
value | String |
|
placeholder | String |
|
password | String |
|
onChange | Function |
|
Label
import * as React from 'react'
import { Label as NekoLabel } from '../components/label'
export const App = () => {
return (
<NekoLabel>Label</NekoLabel>
)
}
Props
# | Type | Default |
---|---|---|
children | React.ReactNode |
|
Select
import * as React from 'react'
import { Select as NekoSelect } from '../components/select'
const options = [
{
value: 1,
text: 'Angular',
},
{
value: 2,
text: 'React',
},
{
value: 3,
text: 'Vue',
},
]
export const App = () => {
const [value, setValue] = React.useState(1)
return (
<NekoSelect options={options} value={value} onChange={setValue} />
)
}
Props
# | Type | Default |
---|---|---|
options | Array<{ value: number text: string}> |
|
value | Number |
|
onChange | Function |
|
4.0.0-alpha.3
2 years ago
4.0.0-alpha.4
2 years ago
4.0.0-beta.0
2 years ago
4.0.0-alpha.1
2 years ago
4.0.0-alpha.2
2 years ago
4.0.0-alpha.0
2 years ago
1.2.2
3 years ago
1.2.1
3 years ago
3.0.2
3 years ago
3.0.1
3 years ago
3.0.0
3 years ago
3.0.0-alpha.1
3 years ago
3.0.0-alpha.0
3 years ago
2.3.0
3 years ago
2.5.0
3 years ago
2.4.0
3 years ago
2.7.0
3 years ago
2.6.0
3 years ago
2.9.0
3 years ago
2.8.0
3 years ago
2.2.0
3 years ago
2.0.2
3 years ago
2.1.0
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago
2.0.0-alpha.1
3 years ago
1.2.0
3 years ago
2.0.0-alpha.0
3 years ago
1.2.0-beta.1
3 years ago
1.2.0-beta.0
3 years ago
1.1.0
3 years ago
1.1.0-beta.0
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
1.0.0-rc.0
4 years ago
1.0.0-beta.1
4 years ago
1.0.0-beta.0
4 years ago
0.2.3
4 years ago
0.2.2
4 years ago
0.2.1
4 years ago
0.2.0
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago