woi-react-components
Version:
This project requires NodeJS (version 18 or later) and NPM. [Node](http://nodejs.org/) and [NPM](https://npmjs.org/) are really easy to install. To make sure you have them available on your machine, try running the following command. ```sh $ npm -v &
23 lines (19 loc) • 2.73 kB
text/mdx
# WOI Icon Button Component
WOI icon button component is a reusable React component for creating interactive buttons in your web application.
## Props
WOI Icon Button component accepts the following props:
- `size` (number): The height and width of the button, specified as a numerical value (e.g., pixels) or as a percentage of its container's width and height.
- `borderRadius` (number): The borderRadius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners.
- `backgroundColor` (string): The background color of the button. You can specify this using a CSS color value, such as a Hex code (#RRGGBB), an RGB color (rgb(R, G, B)), or a named color.
- `hoverBackgroundColor` (string): The background color of the button when the mouse pointer hovers over it. This allows you to change the background color on hover.
- `borderColor` (string): The border-color property is used to set the color of the four borders. The color can be set by: name - specify a color name, like "red", Hex code (#RRGGBB), and RGB color (rgb(R, G, B)).
- `borderThickness` (string): The border-width property sets the width of an element's borders. Specified as a numerical value (e.g., pixels) or as a percentage.
- `loader` (boolean): A boolean flag that determines whether the button is in a loading state. When set to true, the button is not interactive but in loading state.
- `loaderColor` (string): The text color of the button when the mouse pointer hovers over it. This allows you to change the text color on hover.
- `openLink` (string): A URL or link that the button should navigate to when clicked. This prop is used when the button acts as a link to another page or resource.
- `openLinkInNewTab` (boolean): A state that checks the link should in new window or in the same window.
- `clickFunction` (function): A callback function or action that should be executed when the button is clicked. This prop is used to define the behavior of the button when clicked.
- `icon` (string): An icon or image that appears before the button's text. It can be specified as a path to an icon file or a CSS class for an icon font.
- `iconSize` (number): The height and width of the icon, specified as a numerical value (e.g., pixels) or as a percentage of its container's width and height.
- `iconColor` (string): The color of the icon. You can specify this using a CSS color value, such as a Hex code (#RRGGBB), an RGB color (rgb(R, G, B)), or a named color.
- `isDisabled` (boolean): A boolean flag that determines whether the button is in a disabled state. When set to true, the button is not clickable or interactive.