mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat(FE-91): create StepItem component
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
import { cn } from '@/lib/helper';
|
||||
import { Color } from '@/types/theme';
|
||||
|
||||
interface StepItemProps {
|
||||
children?: ReactNode;
|
||||
icon?: ReactNode;
|
||||
className?: string;
|
||||
color?: Color;
|
||||
}
|
||||
|
||||
const StepItem = ({ children, icon, className, color }: StepItemProps) => {
|
||||
const stepItemBaseClassName = cn('step', {
|
||||
'step-primary': color === 'primary',
|
||||
'step-secondary': color === 'secondary',
|
||||
'step-accent': color === 'accent',
|
||||
'step-neutral': color === 'neutral',
|
||||
'step-info': color === 'info',
|
||||
'step-success': color === 'success',
|
||||
'step-warning': color === 'warning',
|
||||
'step-error': color === 'error',
|
||||
});
|
||||
|
||||
return (
|
||||
<li className={cn(stepItemBaseClassName, className)}>
|
||||
<span className='step-icon'>{icon}</span>
|
||||
|
||||
<div>{children}</div>
|
||||
</li>
|
||||
);
|
||||
};
|
||||
|
||||
export default StepItem;
|
||||
Reference in New Issue
Block a user