1 |
|
2 |
|
3 | import { HTMLAttributes, ElementType, Component } from "react";
|
4 | import CommonProps from '../util';
|
5 |
|
6 | export interface ResponsiveGridProps extends HTMLAttributes<HTMLElement>, CommonProps {
|
7 | rows?: number | string;
|
8 | columns?: number | string;
|
9 | gap?: number | Array<number>;
|
10 | device?: 'phone' | 'tablet' | 'desktop';
|
11 | component?: ElementType;
|
12 | }
|
13 |
|
14 | export interface CellProps extends HTMLAttributes<HTMLElement>, CommonProps {
|
15 | component?: ElementType;
|
16 | rowSpan?: number;
|
17 | colSpan?: number | {
|
18 | desktop?: number;
|
19 | tablet?: number;
|
20 | phone?: number;
|
21 | };
|
22 | }
|
23 |
|
24 | export class Cell extends Component<CellProps, any> {}
|
25 |
|
26 | export default class ResponsiveGrid extends Component<ResponsiveGridProps, any> {
|
27 | static Cell: typeof Cell;
|
28 | }
|