import { FC, useMemo } from 'react'; import { Base, Column, ColumnProps, Flex } from '..'; interface LayoutProgressBarProps extends ColumnProps { text?: string; progress: number; maxProgress?: number; } export const LayoutProgressBar: FC = props => { const { text = '', progress = 0, maxProgress = 100, position = 'relative', justifyContent = 'center', classNames = [], children = null, ...rest } = props; const getClassNames = useMemo(() => { const newClassNames: string[] = [ 'border border-[solid] border-[#fff] p-[2px] h-[20px] rounded-[.25rem] overflow-hidden', 'text-white' ]; if(classNames.length) newClassNames.push(...classNames); return newClassNames; }, [ classNames ]); return ( { text && (text.length > 0) && { text } } { children } ); };