website refactor
This commit is contained in:
@@ -12,7 +12,7 @@ import React, { forwardRef, ForwardedRef, ElementType } from 'react';
|
||||
* If you need more complex behavior, create a specific component in apps/website/components.
|
||||
*/
|
||||
|
||||
export type Spacing = 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96;
|
||||
export type Spacing = 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96 | string;
|
||||
|
||||
interface ResponsiveSpacing {
|
||||
base?: Spacing;
|
||||
@@ -82,7 +82,7 @@ export interface BoxProps<T extends ElementType> {
|
||||
h?: string | number | ResponsiveValue<string | number>;
|
||||
|
||||
// Display
|
||||
display?: 'block' | 'inline-block' | 'flex' | 'inline-flex' | 'grid' | 'none' | string | ResponsiveValue<'block' | 'inline-block' | 'flex' | 'inline-flex' | 'grid' | 'none' | string>;
|
||||
display?: 'block' | 'inline-block' | 'flex' | 'inline-flex' | 'grid' | 'none' | string | ResponsiveValue<'block' | 'inline-block' | 'flex' | 'inline-flex' | 'grid' | 'none' | string | any>;
|
||||
center?: boolean;
|
||||
overflow?: 'auto' | 'hidden' | 'visible' | 'scroll' | string;
|
||||
overflowX?: 'auto' | 'hidden' | 'visible' | 'scroll';
|
||||
@@ -393,7 +393,13 @@ export const Box = forwardRef(<T extends ElementType = 'div'>(
|
||||
5: '5', 6: '6', 7: '7', 8: '8', 9: '9', 10: '10', 11: '11', 12: '12', 14: '14',
|
||||
16: '16', 20: '20', 24: '24', 28: '28', 32: '32', 36: '36', 40: '40', 44: '44',
|
||||
48: '48', 52: '52', 56: '56', 60: '60', 64: '64', 72: '72', 80: '80', 96: '96',
|
||||
'auto': 'auto'
|
||||
'auto': 'auto',
|
||||
'none': '0',
|
||||
'xs': '2',
|
||||
'sm': '4',
|
||||
'md': '6',
|
||||
'lg': '8',
|
||||
'xl': '12'
|
||||
};
|
||||
|
||||
const getSpacingClass = (prefix: string, value: Spacing | 'auto' | ResponsiveSpacing | undefined) => {
|
||||
|
||||
Reference in New Issue
Block a user