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[] = [ 'nitro-progress-bar', 'text-white' ]; if(classNames.length) newClassNames.push(...classNames); return newClassNames; }, [ classNames ]); return ( { text && (text.length > 0) && { text } } { children } ); }