Button

唯一的按钮组件:六种变体、四种文字尺寸和四种方形图标尺寸,另含按钮组。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 可用

用法

导入

ts
import {
  SoneButtonDirective,
  SoneButtonGroupDirective,
} from "@surface-one/angular/button";

API 参考

SoneButtonDirective指令

选择器
button[soneBtn], a[soneBtn], label[soneBtn]
导出为
soneBtn
输入
名称类型 默认值
variant

`accent`: filled with the accent (the primary call to action where `default` is ink). `soft`: a translucent grey fill (a quiet icon button). A toggle button with `aria-pressed="true"` gets the pressed fill in `ghost`, `outline` (keeping its border) and `soft`.

ButtonVariant"default"
sizeButtonSize"default"

SoneButtonGroupDirective指令

选择器
[soneButtonGroup]
输入
名称类型 默认值
orientation"horizontal" | "vertical""horizontal"