style: update class names for improved consistency in text editor and switch components
This commit is contained in:
parent
32b435d762
commit
d27c068f39
@ -110,7 +110,7 @@ export const EditorMenuBar = (properties: TProperties) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex items-start justify-between gap-4 rounded-[5px_5px_0_0] px-4 py-3">
|
||||
<div className="flex items-start justify-between gap-4 px-4 py-3">
|
||||
<div className="flex divide-x">
|
||||
<div className="flex max-w-[150px] flex-wrap items-start gap-1 px-1">
|
||||
<EditorButton
|
||||
|
||||
@ -122,7 +122,7 @@ export const TextEditor = <TFormValues extends Record<string, unknown>>(
|
||||
disabled={disabled}
|
||||
/>
|
||||
) : (
|
||||
<div className={twMerge('', className)}>
|
||||
<div className={twMerge('rounded-md', className)}>
|
||||
<EditorMenuBar
|
||||
disabled={disabled}
|
||||
category={category}
|
||||
@ -134,7 +134,7 @@ export const TextEditor = <TFormValues extends Record<string, unknown>>(
|
||||
editor={editor}
|
||||
id={id ?? generatedId}
|
||||
className={twMerge(
|
||||
'prose prose-headings:my-0 prose-p:my-0 max-h-96 max-w-none cursor-text overflow-y-auto rounded-[0_0_5px_5px] border border-[#D2D2D2] p-2',
|
||||
'prose prose-headings:my-0 prose-p:my-0 max-h-96 max-w-none cursor-text overflow-y-auto rounded-b-md p-2',
|
||||
inputClassName,
|
||||
)}
|
||||
onClick={() => editor?.commands.focus()}
|
||||
|
||||
@ -56,7 +56,7 @@ export const Switch = <TFormValues extends Record<string, unknown>>(
|
||||
control={control}
|
||||
rules={rules}
|
||||
render={({ field }) => (
|
||||
<div className={twMerge('flex items-center', inputClassName)}>
|
||||
<div className={twMerge('flex items-center', className)}>
|
||||
<HeadlessSwitch
|
||||
checked={field.value}
|
||||
onChange={(checked) => {
|
||||
@ -64,7 +64,7 @@ export const Switch = <TFormValues extends Record<string, unknown>>(
|
||||
}}
|
||||
className={twMerge(
|
||||
'group relative flex h-7 w-14 cursor-pointer rounded-full bg-[#2E2F7C]/10 p-1 shadow transition-colors duration-200 ease-in-out focus:outline-none data-[checked]:bg-[#2E2F7C]/90 data-[focus]:outline-1 data-[focus]:outline-white',
|
||||
className,
|
||||
inputClassName,
|
||||
)}
|
||||
>
|
||||
<span
|
||||
|
||||
@ -182,7 +182,7 @@ export const CreateContentsPage = () => {
|
||||
name="is_premium"
|
||||
label="Premium"
|
||||
labelClassName="text-sm font-medium text-[#363636]"
|
||||
inputClassName="h-[42px]"
|
||||
className="h-[42px]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user