omi/components/button
YunYouJun 3a3d695206 refactor(common): change common/theme.scss to common/scss/theme.scss 2021-09-08 21:26:12 +08:00
..
scripts refactor(button): add warning/info type & simplify scss & use vite build 2021-08-08 17:36:18 +08:00
src refactor(common): change common/theme.scss to common/scss/theme.scss 2021-09-08 21:26:12 +08:00
test fix(@omiu/button): fix import path of test file 2021-08-08 19:38:32 +08:00
.gitignore refactor(button): add warning/info type & simplify scss & use vite build 2021-08-08 17:36:18 +08:00
README.md refactor(button): add warning/info type & simplify scss & use vite build 2021-08-08 17:36:18 +08:00
index.html refactor(button): add warning/info type & simplify scss & use vite build 2021-08-08 17:36:18 +08:00
package.json fix(@omiu/button): fix import path of test file 2021-08-08 19:38:32 +08:00
tsconfig.json refactor(button): add warning/info type & simplify scss & use vite build 2021-08-08 17:36:18 +08:00
vite.config.ts fix: dispatch resize event to update layout & use vite with omiu-tree 2021-08-28 01:38:45 +08:00

README.md

Button

Click or touch it to trigger an operation. The encapsulated logic is triggered in response to user clicks.

Import

import '@omiu/button'

Or use script tag to ref it.

<script src="https://unpkg.com/@omiu/button"></script>

Usage

<o-button></o-button>

API

Props

{
  size?: 'medium' | 'small' | 'mini',
  type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'
  plain?: boolean,
  round?: boolean,
  circle?: boolean,
  loading?: boolean,
  disabled?: boolean,
  icon?: string,
  autofocus?: boolean,
  nativeType?: 'button' | 'submit' | 'reset',
  block?: boolean
  text?: string
}

Default Props

{
  plain: false,
  round: false,
  circle: false,
  loading: false,
  disabled: false,
  autofocus: false,
  nativeType: 'button',
  block: false
}