Skip to content

Instantly share code, notes, and snippets.

@infelipe13
infelipe13 / Input.jsx
Last active October 8, 2020 15:08
CSS module + Tailwind CSS
import { useId } from "@reach/auto-id";
import clsx from "clsx";
import style from "src/components/Input/style.module.css";
export const Input = ({ errorMessage = "", id, label, ...otherProps }) => {
const inputId = useId(id);
const inputClassName = clsx(style.input, errorMessage && style.inputError);
const ErrorMessage = () => {