Skip to content

Commit c7dbd9f

Browse files
committed
fix: Add spacing in login page; add story
1 parent b6fcd81 commit c7dbd9f

File tree

2 files changed

+20
-28
lines changed

2 files changed

+20
-28
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Story } from "@storybook/react"
2+
import React from "react"
3+
import { SignInForm, SignInProps } from "./SignInForm"
4+
5+
export default {
6+
title: "SignIn/SignInForm",
7+
component: SignInForm,
8+
argTypes: {
9+
loginHandler: { action: "Login" },
10+
},
11+
}
12+
13+
const Template: Story<SignInProps> = (args) => <SignInForm {...args} />
14+
15+
export const Example = Template.bind({})
16+
Example.args = {}

site/components/SignIn/SignInForm.tsx

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,8 @@ const useStyles = makeStyles((theme) => ({
3131
borderTop: `1px solid ${theme.palette.action.disabled}`,
3232
paddingTop: theme.spacing(3),
3333
},
34-
loginTypeToggleWrapper: {
34+
loginTextField: {
3535
marginTop: theme.spacing(2),
36-
display: "flex",
37-
justifyContent: "center",
38-
},
39-
loginTypeToggleBtn: {
40-
color: theme.palette.text.primary,
41-
// We want opacity so that this isn't super highlighted for the user.
42-
// In most cases, they shouldn't want to switch login types.
43-
opacity: 0.5,
44-
"&:hover": {
45-
cursor: "pointer",
46-
opacity: 1,
47-
textDecoration: "underline",
48-
},
49-
},
50-
loginTypeToggleBtnFocusVisible: {
51-
opacity: 1,
52-
textDecoration: "underline",
53-
},
54-
loginTypeBtn: {
55-
backgroundColor: "#2A2B45",
56-
textTransform: "none",
57-
58-
"&:not(:first-child)": {
59-
marginTop: theme.spacing(2),
60-
},
6136
},
6237
submitBtn: {
6338
marginTop: theme.spacing(2),
@@ -101,27 +76,28 @@ export const SignInForm: React.FC<SignInProps> = ({
10176
<FormTextField
10277
autoComplete="email"
10378
autoFocus
79+
className={styles.loginTextField}
10480
eventTransform={(email: string) => email.trim()}
10581
form={form}
10682
formFieldName="email"
10783
fullWidth
10884
inputProps={{
10985
id: "signin-form-inpt-email",
86+
className: styles.innerText,
11087
}}
111-
margin="none"
11288
placeholder="Email"
11389
variant="outlined"
11490
/>
11591
<FormTextField
11692
autoComplete="current-password"
93+
className={styles.loginTextField}
11794
form={form}
11895
formFieldName="password"
11996
fullWidth
12097
inputProps={{
12198
id: "signin-form-inpt-password",
12299
}}
123100
isPassword
124-
margin="none"
125101
placeholder="Password"
126102
variant="outlined"
127103
/>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy