fix(dashboard-v2): fix TextField customization via className

This commit is contained in:
Michał Leszczyk 2022-03-24 10:33:09 +01:00
parent 60c2d35eb9
commit 340fe5f203
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import PropTypes from "prop-types";
import cn from "classnames";
import { Field } from "formik";
export const TextField = ({ id, label, name, error, touched, ...props }) => {
export const TextField = ({ id, label, name, error, touched, className, ...props }) => {
return (
<div className="flex flex-col w-full gap-1">
{label && (
@ -13,7 +13,7 @@ export const TextField = ({ id, label, name, error, touched, ...props }) => {
<Field
id={id}
name={name}
className={cn("w-full py-2 px-4 bg-palette-100 rounded-sm placeholder:text-palette-200 outline-1", {
className={cn("w-full py-2 px-4 bg-palette-100 rounded-sm placeholder:text-palette-200 outline-1", className, {
"focus:outline outline-palette-200": !error || !touched,
"outline outline-error": touched && error,
})}