Skip to content

Commit de1fac6

Browse files
authored
feat(settings): Replace text input with <Textarea/> for multiline support (resolves y-scope#216). (y-scope#233)
1 parent 0cdbb36 commit de1fac6

File tree

1 file changed

+9
-4
lines changed
  • src/components/CentralContainer/Sidebar/SidebarTabs/SettingsTabPanel

1 file changed

+9
-4
lines changed

src/components/CentralContainer/Sidebar/SidebarTabs/SettingsTabPanel/index.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
FormLabel,
1313
Input,
1414
Link,
15+
Textarea,
1516
} from "@mui/joy";
1617

1718
import {NotificationContext} from "../../../../../contexts/NotificationContextProvider";
@@ -162,10 +163,14 @@ const SettingsTabPanel = () => {
162163
<FormLabel>
163164
{field.label}
164165
</FormLabel>
165-
<Input
166-
defaultValue={field.initialValue}
167-
name={field.key}
168-
type={field.type}/>
166+
{"number" === field.type ?
167+
<Input
168+
defaultValue={field.initialValue}
169+
name={field.key}
170+
type={"number"}/> :
171+
<Textarea
172+
defaultValue={field.initialValue}
173+
name={field.key}/>}
169174
<FormHelperText>
170175
{field.helperText}
171176
</FormHelperText>

0 commit comments

Comments
 (0)