0.0.6 • Published 3 years ago

@nami-ui/button v0.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

id: button title: Button

subtitle: 按钮

提供最基本的点击交互功能。

import { Button } from '@nami-ui/button'

export default () => (
  <Button onClick={() => alert('Hello, World!')}>
    Hello
  </Button>
)

状态

每个按钮都有 4 个状态:hoveractivefocusdisabled。通常这些状态都是根据用户行为自动切换,但你也可以让按钮强制处于某个状态:

import { Button } from '@nami-ui/button'
import { HStack } from '@nami-ui/stack'

export default () => (
  <HStack spacing>
    <Button hover>Hover</Button>
    <Button active>Active</Button>
    <Button focus>Focus</Button>
    <Button disabled>Disabled</Button>
  </HStack>
)
0.0.6

3 years ago

0.0.3

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago