Components
GridLayout Component
Components
- 3DCard Component
- AirpodsProLeft Component
- AirpodsProRight Component
- Alert Component
- Audio Component
- Button Component
- Card Component
- ChargingIconRight Component
- ChargingTextLeft Component
- Checkbox Component
- Collapse Component
- EmptyState Component
- ErrorMessage Component
- Form Component
- GridLayout Component
- HelpTooltip Component
- Image Component
- Input Component
- Lamp Component
- LightBox Component
- Modal Component
- MovingBorder Component
- PageLoading Component
- Popover Component
- PropertyDefault Component
- Radio Component
- RangeSlider Component
- Select
- SilentIconLeft Component
- SongThumbnail Component
- SilentTextRight Component
- Spinner Component
- TabButton Component
- TextArea Component
- Toggle Component
- Toggle2 Component
- Tooltip Component
- WarningMessage Component
Components
GridLayout Component
GridLayout
This component provides GridLayout functionality.
Props
prop1
: Description of prop1.prop2
: Description of prop2.
Usage
import { GridLayout } from './GridLayout';
const props = {};
<GridLayout prop1="value1" prop2="value2" />;
import type { FC, ReactNode } from 'react';
import cn from '../cn';
interface GridProps {
children: ReactNode;
className?: string;
classNameChild?: string;
}
export const GridLayout: FC<GridProps> = ({
children,
className = '',
classNameChild = ''
}) => {
return (
<div
className={cn(
'container mx-auto mt-10 max-w-screen-xl grow px-0 pb-2 pt-8 sm:px-5',
className
)}
>
<div className={cn('grid grid-cols-12 lg:gap-8', classNameChild)}>
{children}
</div>
</div>
);
};
export const GridItemFour: FC<GridProps> = ({ children, className = '' }) => {
return (
<div className={cn('col-span-12 md:col-span-12 lg:col-span-4', className)}>
{children}
</div>
);
};
export const GridItemEight: FC<GridProps> = ({ children, className = '' }) => {
return (
<div
className={cn('col-span-12 mb-5 md:col-span-12 lg:col-span-8', className)}
>
{children}
</div>
);
};
On this page