sw-ui-library
v1.1.2
Published
`sw-ui-library` is a React UI component library built with TypeScript and Vite. It provides reusable, customizable UI components to enhance your React applications.
Readme
sw-ui-library
sw-ui-library is a React UI component library built with TypeScript and Vite. It provides reusable, customizable UI components to enhance your React applications.
Installation
npm install sw-ui-libraryor using yarn:
yarn add sw-ui-libraryUsage
Import the components and use them in your React application:
import React from 'react';
import { PrimaryButton, SecondaryButton } from 'sw-ui-library';
const App = () => {
return (
<div>
<PrimaryButton onClick={() => alert('Primary Button Clicked!')} disabled={false} label="Click Me" />
<SecondaryButton onClick={() => alert('Secondary Button Clicked!')} disabled={false} label="Click Me" />
</div>
);
};
export default App;Components
PrimaryButton
A Material-UI styled primary button.
Props:
onClick: Function to handle click events.disabled: Boolean to disable the button.label: The button label.
SecondaryButton
A Material-UI styled secondary button.
Props:
onClick: Function to handle click events.disabled: Boolean to disable the button.label: The button label.
Technologies Used
- Vite
- React
- TypeScript
Prerequisites
- React v18
- Material UI v4
License
MIT
