Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Commit

Permalink
components: Merge TextField and Input
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Guidée <[email protected]>
  • Loading branch information
quentinguidee committed Feb 18, 2024
1 parent fb3fbc5 commit 80592d9
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 142 deletions.
37 changes: 0 additions & 37 deletions packages/components/lib/components/TextField/TextField.stories.tsx

This file was deleted.

51 changes: 0 additions & 51 deletions packages/components/lib/components/TextField/TextField.test.tsx

This file was deleted.

16 changes: 0 additions & 16 deletions packages/components/lib/components/TextField/TextField.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions packages/components/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ import {
TableRow,
TableRowProps,
} from "./components/Table/Table";
import { TextField } from "./components/TextField/TextField";
import { Title, TitleType } from "./components/Title/Title";
import { PageContext, PageProvider } from "./contexts/PageContext";
import { useHasSidebar } from "./hooks/useHasSidebar";
Expand Down Expand Up @@ -155,7 +154,6 @@ export {
TableHead,
TableBody,
TableHeadCell,
TextField,
Title,
Vertical,
useHasSidebar,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { Fragment, useEffect, useState } from "react";
import {
Button,
MaterialIcon,
TextField,
Title,
} from "@vertex-center/components";
import { Button, Input, MaterialIcon, Title } from "@vertex-center/components";
import { Horizontal } from "../../../components/Layouts/Layouts";
import { APIError } from "../../../components/Error/APIError";
import { ProgressOverlay } from "../../../components/Progress/Progress";
Expand Down Expand Up @@ -42,7 +37,7 @@ export default function SettingsNotifications() {
<APIError error={error} />
{!error && (
<Fragment>
<TextField
<Input
id="webhook"
label="Webhook"
value={webhook}
Expand Down
4 changes: 2 additions & 2 deletions src/apps/Auth/pages/Account/AccountEmails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Content from "../../../../components/Content/Content";
import {
Button,
Code,
Input,
List,
ListActions,
ListDescription,
Expand All @@ -10,7 +11,6 @@ import {
ListTitle,
MaterialIcon,
Paragraph,
TextField,
Title,
} from "@vertex-center/components";
import {
Expand Down Expand Up @@ -154,7 +154,7 @@ export default function AccountEmails() {
title="Add email address"
actions={popupCreateActions}
>
<TextField
<Input
label="Email address"
type="email"
value={email}
Expand Down
4 changes: 2 additions & 2 deletions src/apps/Auth/pages/Account/AccountInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import Content from "../../../../components/Content/Content";
import {
Button,
Horizontal,
Input,
MaterialIcon,
TextField,
Title,
Vertical,
} from "@vertex-center/components";
Expand Down Expand Up @@ -55,7 +55,7 @@ export default function AccountInfo() {
<ProgressOverlay show={isLoading} />
<APIError error={error} />
<Vertical gap={20}>
<TextField
<Input
id="username"
label="Username"
value={username}
Expand Down
6 changes: 3 additions & 3 deletions src/apps/Auth/pages/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import "./Login.sass";
import {
Button,
Horizontal,
Input,
Logo,
MaterialIcon,
TextField,
Title,
Vertical,
} from "@vertex-center/components";
Expand Down Expand Up @@ -38,13 +38,13 @@ export default function Login() {
<Title variant="h1">Login</Title>
</Horizontal>
<Vertical gap={20}>
<TextField
<Input
id="username"
label="Username"
onChange={onUsernameChange}
required
/>
<TextField
<Input
id="password"
label="Password"
onChange={onPasswordChange}
Expand Down
6 changes: 3 additions & 3 deletions src/apps/Auth/pages/Register/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { ProgressOverlay } from "../../../../components/Progress/Progress";
import {
Button,
Horizontal,
Input,
Logo,
MaterialIcon,
TextField,
Title,
Vertical,
} from "@vertex-center/components";
Expand Down Expand Up @@ -38,13 +38,13 @@ export default function Register() {
<Title variant="h1">Register</Title>
</Horizontal>
<Vertical gap={20}>
<TextField
<Input
id="username"
label="Username"
onChange={onUsernameChange}
required
/>
<TextField
<Input
id="password"
label="Password"
onChange={onPasswordChange}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TextField } from "@vertex-center/components";
import { Input } from "@vertex-center/components";
import TimezoneField from "../../../../components/TimezoneField/TimezoneField";
import { EnvVariable } from "../../backend/models";

Expand Down Expand Up @@ -32,7 +32,7 @@ export default function EnvVariableInput(props: Readonly<Props>) {
/>
);
} else {
input = <TextField {...inputProps} />;
input = <Input {...inputProps} />;
}

return input;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ import ContainerSelect from "../../components/ContainerSelect/ContainerSelect";
import { ChangeEvent, Fragment, useEffect, useState } from "react";
import { Container } from "../../../../models/container";
import Progress from "../../../../components/Progress";
import {
Button,
MaterialIcon,
TextField,
Title,
} from "@vertex-center/components";
import { Button, Input, MaterialIcon, Title } from "@vertex-center/components";
import { api } from "../../../../backend/api/backend";
import { DatabaseEnvironment } from "../../backend/template";
import { APIError } from "../../../../components/Error/APIError";
Expand Down Expand Up @@ -165,7 +160,7 @@ export default function ContainerDetailsDatabase() {
onChange={onChange}
/>
{databases?.[dbID]?.container_id && (
<TextField
<Input
label="Database name"
onChange={(e: any) =>
onChangeDbName(e, dbID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { Horizontal } from "../../../../components/Layouts/Layouts";
import Spacer from "../../../../components/Spacer/Spacer";
import {
Button,
Input,
MaterialIcon,
Paragraph,
SelectField,
SelectOption,
TextField,
Title,
} from "@vertex-center/components";
import { useParams } from "react-router-dom";
Expand Down Expand Up @@ -115,7 +115,7 @@ export default function ContainerSettings() {
disabled={isLoadingContainer}
/>
</Horizontal>
<TextField
<Input
id="container-name"
label="Container name"
description="The custom name of your choice for this service"
Expand Down
11 changes: 3 additions & 8 deletions src/apps/ReverseProxy/VertexReverseProxy/VertexReverseProxy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ import styles from "./VertexReverseProxy.module.sass";
import { APIError } from "../../../components/Error/APIError";
import ProxyRedirect from "../../../components/ProxyRedirect/ProxyRedirect";
import { Horizontal, Vertical } from "../../../components/Layouts/Layouts";
import {
Button,
MaterialIcon,
TextField,
Title,
} from "@vertex-center/components";
import { Button, Input, MaterialIcon, Title } from "@vertex-center/components";
import Popup from "../../../components/Popup/Popup";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import NoItems from "../../../components/NoItems/NoItems";
Expand Down Expand Up @@ -121,14 +116,14 @@ export default function VertexReverseProxy() {
actions={popupActions}
title="New redirection"
>
<TextField
<Input
id="source"
className={styles.input}
label="Source"
value={source}
onChange={onSourceChange}
/>
<TextField
<Input
id="target"
label="Target"
value={target}
Expand Down

0 comments on commit 80592d9

Please sign in to comment.