packages/ui: fix Grid props types
This commit is contained in:
parent
c84882da4e
commit
d31d82ba3c
@ -10,33 +10,8 @@ type WithArrayType<T> = {
|
||||
[K in keyof T]: Array<T[K]> | T[K];
|
||||
};
|
||||
|
||||
type GridSelectedProps = Pick<
|
||||
HTMLDivElement['style'],
|
||||
| 'alignItems'
|
||||
| 'columnGap'
|
||||
| 'gap'
|
||||
| 'grid'
|
||||
| 'gridArea'
|
||||
| 'gridAutoColumns'
|
||||
| 'gridAutoFlow'
|
||||
| 'gridAutoRows'
|
||||
| 'gridColumn'
|
||||
| 'gridColumnEnd'
|
||||
| 'gridColumnStart'
|
||||
| 'gridRow'
|
||||
| 'gridRowEnd'
|
||||
| 'gridRowStart'
|
||||
| 'gridTemplate'
|
||||
| 'gridTemplateAreas'
|
||||
| 'gridTemplateColumns'
|
||||
| 'gridTemplateRows'
|
||||
| 'justifyContent'
|
||||
| 'justifyItems'
|
||||
| 'placeContent'
|
||||
| 'placeItems'
|
||||
| 'rowGap'
|
||||
>;
|
||||
export type GridProps = Partial<WithArrayType<GridSelectedProps>> & PropsWithChildren;
|
||||
type AllowedProps = Omit<HTMLDivElement['style'], 'color' | 'translate'>;
|
||||
export type GridProps = Partial<WithArrayType<AllowedProps>> & PropsWithChildren;
|
||||
|
||||
export const Grid = styled.div<GridProps>`
|
||||
display: grid;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user