mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
ad27184a91
* fix: outline alignment * fix: textarea auto-resize logic
38 lines
981 B
TypeScript
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>
|
|
);
|