[WEB-1072] fix: pages UI improvements (#4294)

* fix: outline alignment

* fix: textarea auto-resize logic
This commit is contained in:
Aaryan Khandelwal 2024-04-26 18:29:18 +05:30 committed by GitHub
parent f87bb95236
commit ad27184a91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 25 additions and 26 deletions

View file

@ -10,7 +10,7 @@ export const OutlineHeading1 = ({ marking, onClick }: HeadingProps) => (
<button
type="button"
onClick={onClick}
className="ml-4 cursor-pointer text-sm font-medium text-custom-text-400 hover:text-custom-primary-100 max-md:ml-2.5"
className="text-sm text-left font-medium text-custom-text-300 hover:text-custom-primary-100"
>
{marking.text}
</button>
@ -20,7 +20,7 @@ export const OutlineHeading2 = ({ marking, onClick }: HeadingProps) => (
<button
type="button"
onClick={onClick}
className="ml-6 cursor-pointer text-xs font-medium text-custom-text-400 hover:text-custom-primary-100"
className="ml-2 text-xs text-left font-medium text-custom-text-300 hover:text-custom-primary-100"
>
{marking.text}
</button>
@ -30,7 +30,7 @@ export const OutlineHeading3 = ({ marking, onClick }: HeadingProps) => (
<button
type="button"
onClick={onClick}
className="ml-8 cursor-pointer text-xs font-medium text-custom-text-400 hover:text-custom-primary-100"
className="ml-4 text-xs text-left font-medium text-custom-text-300 hover:text-custom-primary-100"
>
{marking.text}
</button>

View file

@ -22,12 +22,19 @@ export const PageEditorTitle: React.FC<Props> = observer((props) => {
return (
<>
{readOnly ? (
<h6 className="-mt-2 break-words bg-transparent text-4xl font-bold">{title}</h6>
<h6
className="break-words bg-transparent text-4xl font-bold"
style={{
lineHeight: "1.2",
}}
>
{title}
</h6>
) : (
<>
<TextArea
onChange={(e) => updateTitle(e.target.value)}
className="-mt-2 w-full bg-custom-background text-4xl font-bold outline-none p-0 border-none resize-none rounded-none"
className="w-full bg-custom-background text-4xl font-bold outline-none p-0 border-none resize-none rounded-none"
style={{
lineHeight: "1.2",
}}

View file

@ -51,7 +51,7 @@ export const PageListBlock: FC<TPageListBlock> = observer((props) => {
>
{/* page title */}
<Tooltip tooltipHeading="Title" tooltipContent={name}>
<h5 className="text-base font-semibold truncate">{name}</h5>
<h5 className="text-base font-medium truncate">{name}</h5>
</Tooltip>
{/* page properties */}