feat: add Inter to inputs
This commit is contained in:
parent
cbe5906b1e
commit
0d3582c99a
|
|
@ -11,6 +11,7 @@ import { clsx } from 'clsx';
|
|||
import { useFormContext } from 'react-hook-form';
|
||||
import dayjs from 'dayjs';
|
||||
import { useShowPostSelector } from '../../../../apps/frontend/src/components/post-url-selector/post.url.selector';
|
||||
import interClass from '../helpers/inter.font';
|
||||
|
||||
export const Canonical: FC<
|
||||
DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
|
||||
|
|
@ -47,7 +48,7 @@ export const Canonical: FC<
|
|||
return (
|
||||
<div className="flex flex-col gap-[6px]">
|
||||
<div className="flex items-center gap-[3px]">
|
||||
<div className="font-['Inter'] text-[14px]">{label}</div>
|
||||
<div className={`${interClass} text-[14px]`}>{label}</div>
|
||||
<div>
|
||||
<svg
|
||||
onClick={onPostSelector}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
import { DetailedHTMLProps, FC, InputHTMLAttributes, useMemo } from 'react';
|
||||
import { clsx } from 'clsx';
|
||||
import { useFormContext } from 'react-hook-form';
|
||||
import interClass from '../helpers/inter.font';
|
||||
|
||||
export const Input: FC<
|
||||
DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
|
||||
|
|
@ -23,7 +24,7 @@ export const Input: FC<
|
|||
|
||||
return (
|
||||
<div className="flex flex-col gap-[6px]">
|
||||
<div className="font-['Inter'] text-[14px]">{label}</div>
|
||||
<div className={`${interClass} text-[14px]`}>{label}</div>
|
||||
<input
|
||||
{...(disableForm ? {} : form.register(props.name))}
|
||||
className={clsx(
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
import {DetailedHTMLProps, FC, SelectHTMLAttributes, useMemo} from "react";
|
||||
import {clsx} from "clsx";
|
||||
import {useFormContext} from "react-hook-form";
|
||||
import interClass from '../helpers/inter.font';
|
||||
|
||||
export const Select: FC<DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> & {error?: any, disableForm?: boolean, label: string, name: string}> = (props) => {
|
||||
const {label, className, disableForm, error, ...rest} = props;
|
||||
|
|
@ -15,7 +16,7 @@ export const Select: FC<DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement
|
|||
|
||||
return (
|
||||
<div className="flex flex-col gap-[6px]">
|
||||
<div className="font-['Inter'] text-[14px]">{label}</div>
|
||||
<div className={`${interClass} text-[14px]`}>{label}</div>
|
||||
<select {...disableForm ? {} : form.register(props.name)} className={clsx("bg-input h-[44px] px-[16px] outline-none border-fifth border rounded-[4px] text-inputText placeholder-inputText", className)} {...rest} />
|
||||
<div className="text-red-400 text-[12px]">{err || <> </>}</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import {DetailedHTMLProps, FC, InputHTMLAttributes, useMemo} from "react";
|
|||
// @ts-ignore
|
||||
import clsx from "clsx";
|
||||
import {useFormContext} from "react-hook-form";
|
||||
import interClass from '../helpers/inter.font';
|
||||
|
||||
export const Textarea: FC<DetailedHTMLProps<InputHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> & {error?: any, disableForm?: boolean, label: string, name: string}> = (props) => {
|
||||
const {label, className, disableForm, error, ...rest} = props;
|
||||
|
|
@ -16,7 +17,7 @@ export const Textarea: FC<DetailedHTMLProps<InputHTMLAttributes<HTMLTextAreaElem
|
|||
|
||||
return (
|
||||
<div className="flex flex-col gap-[6px]">
|
||||
<div className="font-['Inter'] text-[14px]">{label}</div>
|
||||
<div className={`${interClass} text-[14px]`}>{label}</div>
|
||||
<textarea {...disableForm ? {} : form.register(props.name)} className={clsx("bg-input min-h-[150px] p-[16px] outline-none border-fifth border rounded-[4px] text-inputText placeholder-inputText", className)} {...rest} />
|
||||
<div className="text-red-400 text-[12px]">{err || <> </>}</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue