@pagedotapp/page-pricing-section
v0.0.0-alpha.9
Published
PagePricingSection - A reusable React component
Readme
PagePricingSection
A reusable pricingsection component for React applications.
Installation
npm install @pagedotapp/page-pricing-sectionUsage
import { PagePricingSection } from "@pagedotapp/page-pricing-section"
function App() {
return (
<PagePricingSection variant="primary" size="medium">
PagePricingSection Content
</PagePricingSection>
)
}Props
| Prop | Type | Default | Description |
| ----------- | --------------------------------------- | ----------- | ------------------------- |
| children | React.ReactNode | - | Component children |
| className | string | '' | Additional CSS class name |
| variant | 'default' \| 'primary' \| 'secondary' | 'default' | Component variant |
| size | 'small' \| 'medium' \| 'large' | 'medium' | Component size |
| disabled | boolean | false | Disabled state |
Examples
Variants
<PagePricingSection variant="default">Default</PagePricingSection>
<PagePricingSection variant="primary">Primary</PagePricingSection>
<PagePricingSection variant="secondary">Secondary</PagePricingSection>Sizes
<PagePricingSection size="small">Small</PagePricingSection>
<PagePricingSection size="medium">Medium</PagePricingSection>
<PagePricingSection size="large">Large</PagePricingSection>States
<PagePricingSection disabled>Disabled</PagePricingSection>Styling
The component uses CSS modules for styling. You can override styles by passing a custom className or by targeting the component's CSS classes in your global styles.
Development
To run the component in development mode:
npm run storybookTo run tests:
npm run testTo lint the component:
npm run lint