import React, { memo, forwardRef } from 'react';
import Box from '../Box';
import type { IFlexProps } from './types';
import { usePropsResolution } from '../../../hooks/useThemeProps';
import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
const Flex = (props: IFlexProps, ref: any) => {
const {
align,
justify,
wrap,
basis,
grow,
shrink,
direction,
...resolvedProps
} = usePropsResolution('Flex', props);
//TODO: refactor for responsive prop
if (useHasResponsiveProps(props)) {
return null;
}
return (
);
};
//Spacer Component that adds space between components where it is placed
export const Spacer = (props: any) => {
const resolvedProps = usePropsResolution('Spacer', props);
return ;
};
export type { IFlexProps };
export default memo(forwardRef(Flex));