A collection of reusable UI components for React applications.
To install the package, run the following command in your project directory:
npm install my-ui-components
Here's a basic example of how to use the Button
component:
import React from "react";
import { Button } from "my-ui-components";
function App() {
return (
<div>
<h1>Welcome to My App</h1>
<Button variant="primary">Click me</Button>
</div>
);
}
export default App;
A customizable button component with different variants.
Prop | Type | Default | Description |
---|---|---|---|
variant | "primary" | "secondary" | "primary" | The variant of the button. |
className | string | "" | Additional class names to be added to the button element. |
children | React.ReactNode | undefined | The content of the button. |
Plus all standard HTML button props.
<Button variant="secondary" onClick={() => console.log("Clicked!")}>
Secondary Button
</Button>
You can customize the styles of the components by overriding the default styles in your own CSS file.
Contributions are welcome! Please feel free to submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.
If you encounter any problems or have any questions, please open an issue in the GitHub repository.