Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rockyessel/reusable_button

So before we start, I would like to show you what the code for the reusable custom button is going to look like. import React from 'react'; type..
https://github.com/rockyessel/reusable_button

reusable-components tailewindcss typescript

Last synced: about 1 month ago
JSON representation

So before we start, I would like to show you what the code for the reusable custom button is going to look like. import React from 'react'; type..

Awesome Lists containing this project

README

        

# Learn how to create a reusable component in React.js
So before we start, I would like to show you what the code for the reusable custom button is going to look like.

```js
import React from 'react';

type ButtonType = 'button' | 'submit' | 'reset' | undefined;
interface Props {
children: React.ReactNode;
handleClick?: () => void;
styles: string;
type?: ButtonType;
title: string;
disabled?: boolean;
}

const Button = (props: Props) => {
return (

{props.children}

);
};

export default Button;

```
If you're interested in this artcle, you can follow this link