UNPKG

react-components-design-system

Version:

React UI component for design system FIS ES PB5

33 lines (32 loc) 1.35 kB
import React, { ButtonHTMLAttributes, PropsWithChildren, ReactNode } from "react"; import "./ButtonComponent.scss"; export type ButtonType = "primary" | "secondary" | "tertiary" | "text" | "danger" | "link" | "icon-primary" | "icon-secondary" | "icon-ghost" | "icon-primary-circle"; export interface ButtonProps { /**Change the design of button*/ type?: ButtonType; /**Is the button loading or not*/ loading?: boolean; /**Type of component – button*/ htmlType?: ButtonHTMLAttributes<any>["type"]; /**Pass the classname to change the style of button*/ className?: string; /**Function to be called when the button is clicked*/ onClick?: ButtonHTMLAttributes<any>["onClick"]; /** Size md for only button icon */ size?: "lg" | "sm" | "md"; children?: ReactNode; /**Disabled state of button*/ disabled?: boolean; /**Set the icon of button*/ icon?: JSX.Element; /**Set the icon of button*/ iconPlace?: "left" | "right" | "both"; /**Use stroke for color icon */ isUseStrokeSvg?: boolean; /**link for button link */ link?: string; /**link target */ linkTarget?: "_blank" | "_self" | "_parent" | "_top"; } declare const Button: (props: PropsWithChildren<ButtonProps>, ref: React.Ref<any>) => import("react/jsx-runtime").JSX.Element; export default Button;