Skip to content

Commit

Permalink
feat: autofocus the email input on the login page (#3726)
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-fully-ported authored Oct 4, 2023
1 parent 0e5702f commit b821a9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dashboard/src/components/porter/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { boolean } from "zod";
import Tooltip from "./Tooltip";

type Props = {
autoFocus?: boolean;
placeholder: string;
width?: string;
value: string;
Expand All @@ -19,6 +20,7 @@ type Props = {
};

const Input: React.FC<Props> = ({
autoFocus,
placeholder,
width,
value,
Expand Down Expand Up @@ -67,6 +69,7 @@ const Input: React.FC<Props> = ({
<Block width={width}>
{label && <Label>{label}</Label>}
<StyledInput
autoFocus={autoFocus}
value={value}
onChange={handleChange}
placeholder={placeholder}
Expand Down
1 change: 1 addition & 0 deletions dashboard/src/main/auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ const Login: React.FC<Props> = ({
{hasBasic && (
<>
<Input
autoFocus={true}
type="email"
placeholder="Email"
label="Email"
Expand Down

0 comments on commit b821a9f

Please sign in to comment.