Olly Common component 您所在的位置:网站首页 iconalignment Olly Common component

Olly Common component

2023-04-24 16:48| 来源: 网络整理| 查看: 265

Installnpm install @olly/buttonsUsageimport Button, { IconButton } from "@olly/buttons";

A button means an operation (or a series of operations). Clicking a button will trigger corresponding logic. The buttons kind, size, shape and disabled state can be configured using the appropriate props (see examples).

Basic buttons

When kind prop is not specified, button is set to "basic" by default.

Basic Basic Primary buttons Primary Primary Plain buttons Plain Plain Sizes

When size prop is not specified, button size is set to "medium" by default for basic and primary buttons, and "small" for plain buttons.

small medium large small medium large small medium large With Icon

Create a button with icon by passing an icon component into button component as a child element.

import EditIcon from "@olly/icons/icons/edit"; Edit Edit Edit Edit Edit {/* Not recommended */} Edit Edit

Icon can also be passed into button with icon and iconAlignment props. However we do not recommend such usage as icon and iconAlignment will be deprecated in future releases.

Listen to Enter Press Listen enter press PropertieshtmlType"button" | "submit" | "reset" | undefinedonClickMouseEventHandler | undefinedchildren((string | number | boolean | ReactElement | ReactFragment | ReactPortal) & (string | ... 5 more ... | Iterable)) | null | undefinedclassNamestring | undefinediconReactNodekind"primary" | "link" | "default" | "basic" | "plain" | undefined"basic"prefixClsstring | undefinedshape"circle" | "round" | undefinedsizeSizeTypeiconAlignment"left" | "right" | undefinedlistenEnterPressboolean | undefined


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有