JSPM

@nagendrayakkaladevara/react-button-component

1.0.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q25320F
    • License MIT

    A customizable button component for React and TypeScript

    Package Exports

    • @nagendrayakkaladevara/react-button-component
    • @nagendrayakkaladevara/react-button-component/dist/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nagendrayakkaladevara/react-button-component) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @nagendrayakkaladevara/react-button-component

    A customizable button component for React and TypeScript.

    Installation

    Install the package using npm:

    npm install @nagendrayakkaladevara/react-button-component
    

    Usage

    import React from 'react';
    import { Button } from '@nagendrayakkaladevara/react-button-component';
    import '@nagendrayakkaladevara/react-button-component/dist/Button.css';
    
    const App = () => {
      return (
        <div>
          <Button variant="primary" size="large" onClick={() => alert('Button clicked!')}>
            Click Me
          </Button>
        </div>
      );
    };
    
    export default App;

    Features

    • Customizable Styles: Choose from different variants ('primary', 'secondary', 'danger', 'success') and sizes ('small', 'medium', 'large').
    • Event Handling: Easily handle click events with the onClick prop.
    • CSS Customization: Include the provided CSS file or customize styles further using your own CSS.

    Props

    Button Props

    • variant: Specifies the button's style variant.
    • size: Specifies the button's size.
    • onClick: Event handler for button click events.