Olly Common component | 您所在的位置:网站首页 › iconalignment › Olly Common component |
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 buttonsWhen kind prop is not specified, button is set to "basic" by default. Basic Basic Primary buttons Primary Primary Plain buttons Plain Plain SizesWhen 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 IconCreate 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 EditIcon 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 实验室设备网 版权所有 |