bigbuffet-rw/app/soapbox/components/validation-checkmark.tsx
marcin mikołajczak c56728b722 classNames() ==> clsx()
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-02-06 20:28:18 +01:00

28 lines
768 B
TypeScript

import clsx from 'clsx';
import React from 'react';
import { HStack, Icon, Text } from 'soapbox/components/ui';
interface IValidationCheckmark {
isValid: boolean
text: string
}
const ValidationCheckmark = ({ isValid, text }: IValidationCheckmark) => {
return (
<HStack alignItems='center' space={2} data-testid='validation-checkmark'>
<Icon
src={isValid ? require('@tabler/icons/check.svg') : require('@tabler/icons/point.svg')}
className={clsx({
'w-4 h-4': true,
'text-gray-400 dark:text-gray-600 dark:fill-gray-600 fill-gray-400': !isValid,
'text-success-500': isValid,
})}
/>
<Text theme='muted' size='sm'>{text}</Text>
</HStack>
);
};
export default ValidationCheckmark;