[WEB-5809] refactor: tailwind config inline variables (#8437)
This commit is contained in:
parent
e3ba7c2889
commit
92ac28fcb8
169 changed files with 1273 additions and 1130 deletions
|
|
@ -36,7 +36,7 @@ const Input = React.forwardRef(function Input(props: InputProps, ref: React.Forw
|
|||
"rounded-sm border-none bg-transparent ring-0 transition-all focus:ring-1 focus:ring-accent-strong":
|
||||
mode === "transparent",
|
||||
"rounded-sm border-none bg-transparent ring-0": mode === "true-transparent",
|
||||
"border-red-500": hasError,
|
||||
"border-danger-strong": hasError,
|
||||
"px-1.5 py-1": inputSize === "xs",
|
||||
"px-3 py-2": inputSize === "sm",
|
||||
"p-3": inputSize === "md",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export const getStrengthInfo = (strength: E_PASSWORD_STRENGTH): StrengthInfo =>
|
|||
case E_PASSWORD_STRENGTH.LENGTH_NOT_VALID:
|
||||
return {
|
||||
message: "Password is too short",
|
||||
textColor: "text-red-500",
|
||||
textColor: "text-danger-primary",
|
||||
activeFragments: 1,
|
||||
};
|
||||
case E_PASSWORD_STRENGTH.STRENGTH_NOT_VALID:
|
||||
|
|
@ -32,7 +32,7 @@ export const getStrengthInfo = (strength: E_PASSWORD_STRENGTH): StrengthInfo =>
|
|||
case E_PASSWORD_STRENGTH.STRENGTH_VALID:
|
||||
return {
|
||||
message: "Password is strong",
|
||||
textColor: "text-green-500",
|
||||
textColor: "text-success-primary",
|
||||
activeFragments: 3,
|
||||
};
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -53,14 +53,14 @@ export function PasswordStrengthIndicator({
|
|||
<div className="flex items-center justify-center p-0.5">
|
||||
<CircleCheck
|
||||
className={cn("h-3 w-3 flex-shrink-0", {
|
||||
"text-green-500": criterion.isValid,
|
||||
"text-success-primary": criterion.isValid,
|
||||
"text-primary": !criterion.isValid,
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
<span
|
||||
className={cn("!text-11", {
|
||||
"text-green-500": criterion.isValid,
|
||||
"text-success-primary": criterion.isValid,
|
||||
"text-primary": !criterion.isValid,
|
||||
})}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export function PasswordInput({
|
|||
"w-full px-3 py-2 pr-10 text-secondary border rounded-md bg-surface-1 focus:outline-none focus:ring-2 focus:ring-accent-strong placeholder:text-placeholder focus:border-transparent transition-all duration-200",
|
||||
{
|
||||
"border-strong": !error,
|
||||
"border-red-500": error,
|
||||
"border-danger-strong": error,
|
||||
},
|
||||
className
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ export function ValidationMessage({ type, message, className }: ValidationMessag
|
|||
className={cn(
|
||||
"text-13",
|
||||
{
|
||||
"text-red-500": type === "error",
|
||||
"text-green-500": type === "success",
|
||||
"text-danger-primary": type === "error",
|
||||
"text-success-primary": type === "success",
|
||||
},
|
||||
className
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const TextArea = React.forwardRef(function TextArea(
|
|||
"px-1.5 py-1": textAreaSize === "xs",
|
||||
"px-3 py-2": textAreaSize === "sm",
|
||||
"p-3": textAreaSize === "md",
|
||||
"border-red-500": hasError,
|
||||
"border-danger-strong": hasError,
|
||||
"bg-red-100": hasError && mode === "primary",
|
||||
},
|
||||
className
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue