2.1.5 • Published 2 years ago
@vyash5075/react-demo-module v2.1.5
dummy-counter 🚀
A simple React component that counts from 0 - 100 and then resets back to 0. This runs for infinity and yes, this is not meant to be functional in any way.
How to use
Clone this repo to your local computer, then run:
npm install && npm run build
- To make this component available to other projects on your local computer, run
npm link
Quickstart
npx create-react-app my-app
cd my-app
npm install '@vyash5075/react-demo-module'
npm start
Installation
npm install '@vyash5075/react-demo-module'
Usage
import Dummy, { ICounterProps } from '@vyash5075/react-demo-module'
...
Available props
className: string (optional)
To customise this component, pass in a class name to the className
prop and style that class name in your custom CSS.
// your-component.js
import Dummy from '@vyash5075/react-demo-module'
...
<Dummy className="dummy" />
...
// your-component.css
.dummy {
color: white;
background-color: purple;
}
Contributors ⚡
License
This component was built for an article on how to publish a React component as a package to npm.