Add site information management with Markdown support

This commit is contained in:
2025-05-18 11:04:59 +08:00
parent 1b5eb23a65
commit be09b55765
9 changed files with 67 additions and 8 deletions

View File

@@ -1,3 +1,5 @@
import React from "react";
interface InputProps {
type?: string;
placeholder?: string;
@@ -19,4 +21,20 @@ export default function Input(props: InputProps) {
<input type={props.type} className="input w-full" placeholder={props.placeholder} value={props.value} onChange={props.onChange} />
</fieldset>
}
}
interface TextAreaProps {
value: string;
onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
label: string;
height?: string | number;
}
export function TextArea(props: TextAreaProps) {
return <fieldset className="fieldset w-full">
<legend className="fieldset-legend">{props.label}</legend>
<textarea className={`textarea w-full ${props.height != undefined ? "resize-none" : ""}`} value={props.value} onChange={props.onChange} style={{
height: props.height,
}} />
</fieldset>
}