Custom Button Component
Custom Button.
Props
| Property | Type | Description |
|---|---|---|
| id | string | The unique identifier for the element |
| value | string | The value of the element |
| onClick | (event: ChangeEvent<HTMLInputElement>) => void | The event handler for when the element is clicked |
| className | string | The CSS class name(s) applied to the element |
| name | string | The name of the element |
| disabled | boolean | Whether the element is disabled or not |
| type | string | The type of the button, can be one of "submit", "reset" or "button" |
Usage
Here's an example of how to use the Custom Button component:
Functional Component
App.tsx
import { CustomBtn } from 'building-blocks';
function App() {
return (
// specifies the tag for render the MultiSelect component
<CustomBtn
id="id_90"
value="Submit"
type="submit"
className="btn-class"
onClick={onClick}
/>
);
}