plane/web/components/pages/editor/summary/heading-components.tsx
Aaryan Khandelwal ad27184a91
[WEB-1072] fix: pages UI improvements (#4294)
* fix: outline alignment

* fix: textarea auto-resize logic
2024-04-26 18:29:18 +05:30

38 lines
981 B
TypeScript

// document editor
import { IMarking } from "@plane/document-editor";
type HeadingProps = {
marking: IMarking;
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
};
export const OutlineHeading1 = ({ marking, onClick }: HeadingProps) => (
<button
type="button"
onClick={onClick}
className="text-sm text-left font-medium text-custom-text-300 hover:text-custom-primary-100"
>
{marking.text}
</button>
);
export const OutlineHeading2 = ({ marking, onClick }: HeadingProps) => (
<button
type="button"
onClick={onClick}
className="ml-2 text-xs text-left font-medium text-custom-text-300 hover:text-custom-primary-100"
>
{marking.text}
</button>
);
export const OutlineHeading3 = ({ marking, onClick }: HeadingProps) => (
<button
type="button"
onClick={onClick}
className="ml-4 text-xs text-left font-medium text-custom-text-300 hover:text-custom-primary-100"
>
{marking.text}
</button>
);