Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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..
- Host: GitHub
- URL: https://github.com/rockyessel/reusable_button
- Owner: rockyessel
- License: mit
- Created: 2023-04-17T21:44:00.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-27T18:27:07.000Z (about 2 months ago)
- Last Synced: 2024-10-27T22:37:44.050Z (about 2 months ago)
- Topics: reusable-components, tailewindcss, typescript
- Language: TypeScript
- Homepage: https://reusablebutton.vercel.app
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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