InputErrorIcon.tsx27 lines · main
| 1 | import { AlertCircle } from 'lucide-react' |
| 2 | import React from 'react' |
| 3 | |
| 4 | import styleHandler from '../theme/styleHandler' |
| 5 | |
| 6 | interface Props { |
| 7 | style?: React.CSSProperties |
| 8 | size?: 'tiny' | 'small' | 'medium' | 'large' | 'xlarge' |
| 9 | } |
| 10 | |
| 11 | const sizeMap = { |
| 12 | tiny: 14, |
| 13 | small: 16, |
| 14 | medium: 20, |
| 15 | large: 24, |
| 16 | xlarge: 32, |
| 17 | } |
| 18 | |
| 19 | export default function InputErrorIcon({ style, size = 'medium' }: Props) { |
| 20 | const __styles = styleHandler('inputErrorIcon') |
| 21 | |
| 22 | return ( |
| 23 | <div className={__styles.base} style={style}> |
| 24 | <AlertCircle size={sizeMap[size]} strokeWidth={2} /> |
| 25 | </div> |
| 26 | ) |
| 27 | } |