Compare commits
2 Commits
ff752985c6
...
3f252a8abd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f252a8abd | ||
|
|
0740072a60 |
@@ -2,6 +2,7 @@ import type { AnyFieldMeta } from '@tanstack/react-form';
|
||||
import { LucideEye, LucideEyeClosed } from 'lucide-react';
|
||||
import { useCallback, useId, useState } from 'react';
|
||||
import { InfoIcon, type InfoIconProps } from '../info';
|
||||
import { Text } from '@radix-ui/themes';
|
||||
|
||||
export type TextFieldProps = {
|
||||
label?: string;
|
||||
@@ -32,6 +33,11 @@ export function TextField({ label, value, onChange, labelProps, labelDivProps, s
|
||||
{label && (
|
||||
<div style={{ fontSize: 12, color: 'var(--gray-9)', marginBottom: 6, display: 'flex', alignItems: 'center' }} {...labelDivProps}>
|
||||
{label}
|
||||
{rest?.required && (
|
||||
<Text size="3" style={{ color: 'var(--red-9)', marginLeft: 2 }}>
|
||||
*
|
||||
</Text>
|
||||
)}
|
||||
{infoIconProps && <InfoIcon {...infoIconProps} style={{ marginLeft: 4, verticalAlign: 'middle' }} />}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -44,7 +44,7 @@ export function useQueryMessage(
|
||||
|
||||
messageStr.current = queryMessageString;
|
||||
if (displayMessages) {
|
||||
toast[queryMessage.type](queryMessage.code, {
|
||||
toast[queryMessage.type](queryMessage.message, {
|
||||
position: 'top-center',
|
||||
autoClose: 5000,
|
||||
hideProgressBar: false,
|
||||
|
||||
Reference in New Issue
Block a user