@dcentralab/wc-button
v2.0.34
Published
## Instalation
Downloads
474
Readme
Networks icons
Instalation
npm install @dcentralab/wc-button
or
yarn add @dcentralab/wc-button
Getting started
wc-button is a button that already have shared wallet connect styles properties (background, hover effects,tooltip, ...etc)
import { WcButton } from "@dcentralab/wc-button";
return (
<WcButton tooltipProps={{ title: "this is tooltip" }}>
<div className="web3-wc-selected-network">Am button text</div>
</WcButton>
);
Interfaces
declare type TooltipPosition = "top" | "bottom" | "left" | "right";
export interface ITooltipProps {
title?: string;
html?: JSX.Element;
disabled?: boolean;
open?: boolean;
arrow?: boolean;
offset?: number;
interactive?: boolean;
position?: TooltipPosition;
hideOnClick?: boolean | "persistent";
className?: string;
}
export interface IHasTooltipProps {
tooltipProps?: ITooltipProps;
}
export interface IWcButton extends ButtonHTMLAttributes<any>, IHasTooltipProps {
children: JSX.Element;
width?: number;
hovered?: boolean;
}