mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-06 18:14:35 +02:00
nit (#3441)
This commit is contained in:
@@ -145,6 +145,7 @@ export function TextFormField({
|
|||||||
min,
|
min,
|
||||||
onChange,
|
onChange,
|
||||||
width,
|
width,
|
||||||
|
vertical,
|
||||||
}: {
|
}: {
|
||||||
value?: string;
|
value?: string;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -170,6 +171,7 @@ export function TextFormField({
|
|||||||
min?: number;
|
min?: number;
|
||||||
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
||||||
width?: string;
|
width?: string;
|
||||||
|
vertical?: boolean;
|
||||||
}) {
|
}) {
|
||||||
let heightString = defaultHeight || "";
|
let heightString = defaultHeight || "";
|
||||||
if (isTextArea && !heightString) {
|
if (isTextArea && !heightString) {
|
||||||
@@ -209,14 +211,16 @@ export function TextFormField({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`w-full ${width}`}>
|
<div className={`w-full ${width}`}>
|
||||||
<div className="flex flex-col gap-x-2 items-start">
|
<div className={`flex ${vertical ? "flex-col" : "flex-row"} items-start`}>
|
||||||
{!removeLabel && (
|
<div className="flex gap-x-2 items-center">
|
||||||
<Label className={sizeClass.label} small={small}>
|
{!removeLabel && (
|
||||||
{label}
|
<Label className={sizeClass.label} small={small}>
|
||||||
</Label>
|
{label}
|
||||||
)}
|
</Label>
|
||||||
{optional ? <span>(optional) </span> : ""}
|
)}
|
||||||
{tooltip && <ToolTipDetails>{tooltip}</ToolTipDetails>}
|
{optional ? <span>(optional) </span> : ""}
|
||||||
|
{tooltip && <ToolTipDetails>{tooltip}</ToolTipDetails>}
|
||||||
|
</div>
|
||||||
{error ? (
|
{error ? (
|
||||||
<ManualErrorMessage>{error}</ManualErrorMessage>
|
<ManualErrorMessage>{error}</ManualErrorMessage>
|
||||||
) : (
|
) : (
|
||||||
|
@@ -44,6 +44,7 @@ const EditPropertyModal = ({
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<TextFormField
|
<TextFormField
|
||||||
|
vertical
|
||||||
label={propertyDetails || ""}
|
label={propertyDetails || ""}
|
||||||
name="propertyValue"
|
name="propertyValue"
|
||||||
placeholder="Property value"
|
placeholder="Property value"
|
||||||
|
Reference in New Issue
Block a user