File tree 1 file changed +47
-0
lines changed
1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Type definitions for styled-css-grid
2
+ // Project: https://github.com/azz/styled-css-grid
3
+ // Definitions by: protocol114 <https://github.com/protocol114>
4
+
5
+ declare module 'styled-css-grid' {
6
+ import * as React from "react" ;
7
+ import { StyledComponent } from "styled-components" ;
8
+
9
+ export interface ICellProps extends React . ComponentPropsWithRef < 'div' > {
10
+ className ?: string ,
11
+ width ?: number ,
12
+ height ?: number ,
13
+ top ?: number | string ,
14
+ left ?: number | string ,
15
+ middle ?: boolean ,
16
+ center ?: boolean ,
17
+ area ?: string
18
+ }
19
+
20
+ export interface IGridProps extends React . ComponentPropsWithRef < 'div' > {
21
+ className ?: string ,
22
+ columns ?: number | string ,
23
+ gap ?: string ,
24
+ columnGap ?: string ,
25
+ rowGap ?: string ,
26
+ height ?: string ,
27
+ minRowHeight ?: string ,
28
+ flow ?: string ,
29
+ rows ?: number | string ,
30
+ areas ?: string [ ] ,
31
+ justifyContent ?: string ,
32
+ alignContent ?: string
33
+ }
34
+
35
+ export type GridComponent = StyledComponent <
36
+ React . ForwardRefExoticComponent < Partial < IGridProps > > ,
37
+ any
38
+ > ;
39
+
40
+ export type CellComponent = StyledComponent <
41
+ React . ForwardRefExoticComponent < Partial < ICellProps > > ,
42
+ any
43
+ > ;
44
+
45
+ export const Grid : GridComponent ;
46
+ export const Cell : CellComponent ;
47
+ }
You can’t perform that action at this time.
0 commit comments