feat: TextInput/TextArea borderless+ariaLabel+onKeyDown, Alert info, иконка info (0.11.0)
Для инлайн-ячеек таблиц СТ и info-баннеров при перекраске форм. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -28,3 +28,9 @@
|
||||
color: $red-500;
|
||||
border-color: #fecaca;
|
||||
}
|
||||
|
||||
.info {
|
||||
background: $navy-50;
|
||||
color: $navy-800;
|
||||
border-color: $navy-100;
|
||||
}
|
||||
|
||||
+5
-3
@@ -3,7 +3,7 @@ import styles from './Alert.module.scss';
|
||||
import { Icon } from '../Icon/Icon';
|
||||
import { IconName } from '../Icon/iconNames';
|
||||
|
||||
type AlertVariant = 'warn' | 'ok' | 'err';
|
||||
type AlertVariant = 'warn' | 'ok' | 'err' | 'info';
|
||||
|
||||
interface IAlertProps {
|
||||
variant: AlertVariant;
|
||||
@@ -13,13 +13,15 @@ interface IAlertProps {
|
||||
const variantClass: Record<AlertVariant, string> = {
|
||||
warn: styles.warn,
|
||||
ok: styles.ok,
|
||||
err: styles.err
|
||||
err: styles.err,
|
||||
info: styles.info
|
||||
};
|
||||
|
||||
const variantIcon: Record<AlertVariant, IconName> = {
|
||||
warn: 'warning',
|
||||
ok: 'check',
|
||||
err: 'close'
|
||||
err: 'close',
|
||||
info: 'info'
|
||||
};
|
||||
|
||||
export const Alert: React.FC<IAlertProps> = ({ variant, children }) => {
|
||||
|
||||
Reference in New Issue
Block a user