0.1.1 • Published 8 months ago
button-badge v0.1.1
React Components
This repository contains three React components: Button, Badge, and myComponent.
Button Component
The Button component is a customizable button element that can be used in your React applications. It accepts the following props:
kind
(string): Specifies the type of button, e.g., "primary" or "secondary".id
(string): A unique identifier for the button.type
(string): The HTML button type, e.g., "button" or "submit".name
(string): The name attribute for the button.value
(string): The value attribute for the button.disabled
(boolean): If true, the button is disabled.handleClick
(function): A callback function to handle button click events.
Example usage:
import React from 'react';
import Button from './Button';
<Button
kind="primary"
id="submit-button"
type="submit"
name="submitButton"
value="Submit"
disabled={false}
handleClick={() => alert('Button clicked!')}
label="Submit"
/>
### Badge Component
The Badge component displays a numerical value in a styled badge. It accepts the following prop:
value (number): The numerical value to display in the badge.
Example usage:
import Badge from './Badge';
<div>
<h2>Notification Badge</h2>
<Badge value={5} />
</div>
#### myComponent
The myComponent is a styled container component that can be used to wrap other content with a specific style. It does not have any specific props of its own but can accept child components.
Example usage:
import myComponent from './myComponent';
<myComponent>
<p>This content is wrapped in myComponent and styled accordingly.</p>
</myComponent>