Files
outline/shared/editor/embeds/PlantUml.tsx
T
Tom Moor 2f68f32b40 fix: Polish UI copy, casing, and punctuation (#14144)
* fix: Polish UI copy, casing, and punctuation across the app

* fix: Remove duplicate period in API key scope hint
2026-10-19 09:05:24 -04:00

32 lines
774 B
TypeScript

import * as React from "react";
import Frame from "../components/Frame";
import Image from "../components/Img";
import type { EmbedProps as Props } from ".";
import { useTheme } from "styled-components";
function PlantUmlDiagrams({ matches, ...props }: Props) {
const theme = useTheme();
const mode = theme.isDark ? "dsvg" : "svg";
const title = props.attrs.href.split("/uml/")[1];
const finalUrl = `https://www.plantuml.com/plantuml/${mode}/${title}`;
return (
<Frame
{...props}
src={finalUrl}
icon={
<Image
src="/images/plantuml.png"
alt="PlantUML"
width={16}
height={16}
/>
}
canonicalUrl={props.attrs.href}
border
/>
);
}
export default PlantUmlDiagrams;