chore: disabled style in textarea and input
This commit is contained in:
@@ -37,7 +37,12 @@ const Input: FC<Props> = ({ type = "text", prefix = "", className = "", ...rest
|
|||||||
const isNone = className.includes("none");
|
const isNone = className.includes("none");
|
||||||
// const noInner=!className.includes("inner");
|
// const noInner=!className.includes("inner");
|
||||||
const isPwd = type == "password";
|
const isPwd = type == "password";
|
||||||
const inputClass = clsx(`w-full bg-white dark:bg-gray-800 text-sm text-gray-800 dark:text-gray-200 p-2 outline-none disabled:text-gray-500 disabled:bg-gray-100 dark:disabled:text-gray-500 dark:disabled:bg-gray-800/50 placeholder:text-gray-400`,
|
const inputClass = clsx(`w-full bg-white dark:bg-gray-800 text-sm text-gray-800 dark:text-gray-200 p-2 outline-none
|
||||||
|
disabled:text-gray-500 disabled:bg-gray-100
|
||||||
|
dark:disabled:text-gray-500
|
||||||
|
dark:disabled:bg-gray-800/50
|
||||||
|
dark:disabled:border-gray-600
|
||||||
|
placeholder:text-gray-400`,
|
||||||
// noInner && 'rounded border border-solid border-gray-200 shadow',
|
// noInner && 'rounded border border-solid border-gray-200 shadow',
|
||||||
isLarge && 'py-3',
|
isLarge && 'py-3',
|
||||||
isNone && "border-none bg-transparent shadow-none",
|
isNone && "border-none bg-transparent shadow-none",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ type Props = TextareaHTMLAttributes<HTMLTextAreaElement>
|
|||||||
const StyledTextarea = forwardRef(({ className, ...rest }: Props, ref) => {
|
const StyledTextarea = forwardRef(({ className, ...rest }: Props, ref) => {
|
||||||
return <textarea ref={ref} className={`rounded text-sm p-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 resize-none w-full shadow-sm
|
return <textarea ref={ref} className={`rounded text-sm p-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 resize-none w-full shadow-sm
|
||||||
border border-solid border-gray-200 dark:border-gray-400
|
border border-solid border-gray-200 dark:border-gray-400
|
||||||
disabled:bg-gray-100 dark:disabled:bg-gray-800/50
|
disabled:bg-gray-100 dark:disabled:bg-gray-800/50 dark:disabled:border-gray-600
|
||||||
disabled:text-gray-400 dark:disabled:text-gray-500
|
disabled:text-gray-400 dark:disabled:text-gray-500
|
||||||
disabled:pointer-events-none
|
disabled:pointer-events-none
|
||||||
placeholder:text-gray-400
|
placeholder:text-gray-400
|
||||||
|
|||||||
Reference in New Issue
Block a user