mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
A bunch of improvements
This commit is contained in:
parent
2b6b1d858d
commit
8388c93e62
14 changed files with 1317 additions and 182 deletions
|
@ -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>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue