@pagedotapp/page-hero-section
v0.0.0-alpha.12
Published
Hero section component with multiple layout variants
Readme
Page-hero-section
A reusable -hero-section component for React applications.
Installation
npm install @pagedotapp/page-hero-sectionUsage
import { Page-hero-section } from '@pagedotapp/page-hero-section';
function App() {
return (
<Page-hero-section variant="primary" size="medium">
Page-hero-section Content
</Page-hero-section>
);
}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
<Page-hero-section variant="default">Default</Page-hero-section>
<Page-hero-section variant="primary">Primary</Page-hero-section>
<Page-hero-section variant="secondary">Secondary</Page-hero-section>Sizes
<Page-hero-section size="small">Small</Page-hero-section>
<Page-hero-section size="medium">Medium</Page-hero-section>
<Page-hero-section size="large">Large</Page-hero-section>States
<Page-hero-section disabled>Disabled</Page-hero-section>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