chore init
This commit is contained in:
1 parent
1b7406b1d3
commit
a0d312a884
60 files changed
+5046
-125
No files matched your search
@@ -0,0 +1,47 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { Textarea } from "@/components/ui/Textarea";
|
||||
|
||||
interface MarkdownTextareaProps {
|
||||
id: string;
|
||||
label: string;
|
||||
value: string;
|
||||
onChange: (text: string) => void;
|
||||
placeholder?: string;
|
||||
minHeightClass?: string;
|
||||
}
|
||||
|
||||
export function MarkdownTextarea({
|
||||
id,
|
||||
label,
|
||||
value,
|
||||
onChange,
|
||||
placeholder,
|
||||
minHeightClass,
|
||||
}: MarkdownTextareaProps) {
|
||||
return (
|
||||
<div className="flex flex-col gap-1.5">
|
||||
<div className="flex items-baseline justify-between gap-2">
|
||||
<label htmlFor={id} className="text-sm font-semibold text-ink">
|
||||
{label}
|
||||
</label>
|
||||
<Link
|
||||
href="/documentation"
|
||||
className="text-xs text-muted underline-offset-2 hover:text-accent hover:underline"
|
||||
>
|
||||
Syntaxe Markdown
|
||||
</Link>
|
||||
</div>
|
||||
<Textarea
|
||||
id={id}
|
||||
role="tabpanel"
|
||||
aria-labelledby={`tab-${id.replace("textarea-", "")}`}
|
||||
value={value}
|
||||
onChange={(event) => onChange(event.target.value)}
|
||||
placeholder={placeholder}
|
||||
className={minHeightClass}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user