website refactor
This commit is contained in:
35
apps/website/ui/GridItem.tsx
Normal file
35
apps/website/ui/GridItem.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import React, { ReactNode, ElementType, forwardRef, ForwardedRef } from 'react';
|
||||
import { Box, BoxProps, ResponsiveValue } from './Box';
|
||||
|
||||
export interface GridItemProps<T extends ElementType> extends BoxProps<T> {
|
||||
as?: T;
|
||||
children?: ReactNode;
|
||||
colSpan?: number | ResponsiveValue<number>;
|
||||
rowSpan?: number | ResponsiveValue<number>;
|
||||
}
|
||||
|
||||
export const GridItem = forwardRef(<T extends ElementType = 'div'>(
|
||||
{
|
||||
children,
|
||||
colSpan,
|
||||
rowSpan,
|
||||
as,
|
||||
...props
|
||||
}: GridItemProps<T>,
|
||||
ref: ForwardedRef<HTMLElement>
|
||||
) => {
|
||||
return (
|
||||
<Box
|
||||
as={as}
|
||||
ref={ref}
|
||||
colSpan={colSpan}
|
||||
// rowSpan is not directly supported by Box yet, but we can add it if needed
|
||||
// or use style
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</Box>
|
||||
);
|
||||
});
|
||||
|
||||
GridItem.displayName = 'GridItem';
|
||||
@@ -21,7 +21,7 @@ export const StatusIndicator = ({
|
||||
subLabel,
|
||||
size = 'md',
|
||||
icon
|
||||
}:) => {
|
||||
}: StatusIndicatorProps) => {
|
||||
const activeStatus = (status || variant || 'pending') as any;
|
||||
|
||||
const configMap: any = {
|
||||
|
||||
Reference in New Issue
Block a user