mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 20:27:23 +00:00
Add site information management with Markdown support
This commit is contained in:
@@ -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>
|
||||
}
|
Reference in New Issue
Block a user