6ede33ccdb
Build and Push Docker Images / create_manifest (web, surfsense-web, , cpu) (push) Has been cancelled
Build and Push Docker Images / finalize_release (push) Has been cancelled
Obsidian Plugin Lint / lint (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, cpu, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64, , runner, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, cpu, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64, , runner, false, cpu) (push) Has been cancelled
Build and Push Docker Images / compute_version (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cpu, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, , production, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cpu, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, , production, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu126, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, -cuda126, production, true, cuda126) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu126, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, -cuda126, production, true, cuda126) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu128, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, -cuda, production, true, cuda) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu128, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, -cuda, production, true, cuda) (push) Has been cancelled
Build and Push Docker Images / verify_digests (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, , cpu) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, -cuda, cuda) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, -cuda126, cuda126) (push) Has been cancelled
56 lines
1.6 KiB
TypeScript
56 lines
1.6 KiB
TypeScript
"use client";
|
|
|
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
|
|
import type { PlateElementProps } from "platejs/react";
|
|
import { PlateElement } from "platejs/react";
|
|
import * as React from "react";
|
|
|
|
const headingVariants = cva("relative mb-1 first:mt-0", {
|
|
variants: {
|
|
variant: {
|
|
h1: "mt-[1.6em] pb-1 font-bold font-heading text-4xl",
|
|
h2: "mt-[1.4em] pb-px font-heading font-semibold text-2xl tracking-tight",
|
|
h3: "mt-[1em] pb-px font-heading font-semibold text-xl tracking-tight",
|
|
h4: "mt-[0.75em] font-heading font-semibold text-lg tracking-tight",
|
|
h5: "mt-[0.75em] font-semibold text-lg tracking-tight",
|
|
h6: "mt-[0.75em] font-semibold text-base tracking-tight",
|
|
},
|
|
},
|
|
});
|
|
|
|
export function HeadingElement({
|
|
variant = "h1",
|
|
...props
|
|
}: PlateElementProps & VariantProps<typeof headingVariants>) {
|
|
return (
|
|
<PlateElement as={variant!} className={headingVariants({ variant })} {...props}>
|
|
{props.children}
|
|
</PlateElement>
|
|
);
|
|
}
|
|
|
|
export function H1Element(props: PlateElementProps) {
|
|
return <HeadingElement variant="h1" {...props} />;
|
|
}
|
|
|
|
export function H2Element(props: PlateElementProps) {
|
|
return <HeadingElement variant="h2" {...props} />;
|
|
}
|
|
|
|
export function H3Element(props: PlateElementProps) {
|
|
return <HeadingElement variant="h3" {...props} />;
|
|
}
|
|
|
|
export function H4Element(props: PlateElementProps) {
|
|
return <HeadingElement variant="h4" {...props} />;
|
|
}
|
|
|
|
export function H5Element(props: PlateElementProps) {
|
|
return <HeadingElement variant="h5" {...props} />;
|
|
}
|
|
|
|
export function H6Element(props: PlateElementProps) {
|
|
return <HeadingElement variant="h6" {...props} />;
|
|
}
|