feat(run-code): add RunCode component for executing code
This commit is contained in:
parent
e2d1ded341
commit
a0b1327db7
23
src/components/run-code.tsx
Normal file
23
src/components/run-code.tsx
Normal file
@ -0,0 +1,23 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
import { PlayIcon } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
interface RunCodeProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default function RunCode({
|
||||
className,
|
||||
...props
|
||||
}: RunCodeProps) {
|
||||
return (
|
||||
<Button
|
||||
{...props}
|
||||
variant="secondary"
|
||||
className={cn("h-8 px-3 py-1.5", className)}
|
||||
>
|
||||
<PlayIcon className="-ms-1 opacity-60" size={16} aria-hidden="true" />
|
||||
Run
|
||||
</Button>
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user