A bunch of improvements

This commit is contained in:
Ayaz Hafiz 2023-07-17 18:55:59 -05:00
parent 2b6b1d858d
commit 8388c93e62
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
14 changed files with 1317 additions and 182 deletions

View file

@ -0,0 +1,29 @@
import clsx from "clsx";
import { Variable } from "../../schema";
import { ContentStyles } from "./../Content";
export function VariableElHelp({
variable,
styles,
onClick,
}: {
variable: Variable;
styles: ContentStyles;
onClick?: () => void;
}): JSX.Element {
const { name, bg } = styles;
return (
<span className={clsx("py-0 pl-0 pr-1 rounded-md", bg)}>
<span
className="ring-1 ring-inset ring-black-100 mr-1 px-1 bg-white rounded-md cursor"
onClick={(e) => {
e.stopPropagation();
onClick?.();
}}
>
{variable}
</span>
{name}
</span>
);
}