Skip to content

Commit ea27928

Browse files
committed
Style adjustments to align with Figma
1 parent 11be6b3 commit ea27928

File tree

9 files changed

+22
-31
lines changed

9 files changed

+22
-31
lines changed

src/login/Template.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const Container = styled.div(({ theme }) => ({
1616
alignItems: "center",
1717
paddingBlockStart: "24px",
1818
paddingBlockEnd: "24px",
19+
backgroundColor: theme.custom.colors.lightGray1,
1920
[theme.breakpoints.down("sm")]: {
2021
alignItems: "flex-start"
2122
}
@@ -39,9 +40,9 @@ const Header = styled.header(({ theme }) => ({
3940
}
4041
}))
4142

42-
const Title = styled(Typography)({
43-
fontWeight: "normal"
44-
})
43+
const Title = styled(Typography)(({ theme }) => ({
44+
fontWeight: theme.typography.fontWeightBold
45+
}))
4546

4647
const Content = styled.div({
4748
paddingInlineStart: "32px",
@@ -90,7 +91,7 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
9091
<Container>
9192
<Card>
9293
<Header>
93-
<Logos homeUrl={olSettings?.homeUrl} />
94+
<Logos />
9495
{/* App-initiated actions should not see warning messages about the need to complete the action during login. */}
9596
{displayMessage && message !== undefined && (message.type !== "warning" || !isAppInitiatedAction) && (
9697
<div className={`alert-${message.type} pf-m-${message?.type === "error" ? "danger" : message.type}`}>

src/login/UserProfileFormFields.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ export default function UserProfileFormFields(props: Omit<UserProfileFormFieldsP
3434

3535
const groupNameRef = { current: "" }
3636

37-
console.log("formFieldStates", formFieldStates)
38-
3937
return (
4038
<>
4139
{formFieldStates.map(({ attribute, displayableErrors, valueOrValues }) => {
@@ -236,6 +234,7 @@ function InputTag(props: InputFieldByTypeProps & { fieldIndex: number | undefine
236234
return (
237235
<>
238236
<TextField
237+
size="medium"
239238
id={attribute.name}
240239
name={attribute.name}
241240
label={label}

src/login/components/Elements.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,15 @@ export const SocialProviderButtonLink = styled(SmootButtonLink)(({ theme }) => (
4141
width: "100%",
4242
color: theme.custom.colors.black,
4343
...theme.typography.subtitle1,
44-
fontWeight: theme.typography.fontWeightBold,
44+
fontWeight: theme.typography.fontWeightMedium,
45+
fontSize: theme.typography.pxToRem(14),
4546
display: "inline-flex",
4647
justifyContent: "center",
4748
alignItems: "center",
4849
gap: "8px",
4950
"&:hover, &:hover:not(:disabled)": {
5051
backgroundColor: "inherit",
51-
borderColor: theme.custom.colors.black,
52-
borderWidth: "2px",
53-
padding: "11px 23px"
52+
borderColor: theme.custom.colors.black
5453
}
5554
}))
5655

@@ -77,7 +76,7 @@ export const ValidationMessage = styled.span(({ theme }) => ({
7776
export const Info = styled.div(({ theme }) => ({
7877
...theme.typography.body2,
7978
color: theme.custom.colors.darkGray1,
80-
marginTop: "8px",
79+
marginTop: "24px",
8180
a: {
8281
...theme.typography.body2
8382
}
@@ -99,7 +98,7 @@ const Separator = styled.div(({ theme }) => ({
9998
display: "flex",
10099
alignItems: "center",
101100
textAlign: "center",
102-
padding: "16px 0",
101+
padding: "24px 0",
103102
"&::before, &::after": {
104103
content: '""',
105104
flex: 1,
@@ -110,8 +109,10 @@ const Separator = styled.div(({ theme }) => ({
110109
span: {
111110
textAlign: "center",
112111
margin: "0 20px",
113-
fontSize: "16px",
114-
color: theme.custom.colors.darkGray2
112+
fontSize: theme.typography.pxToRem(14),
113+
color: theme.custom.colors.silverGrayDark,
114+
height: "32px",
115+
lineHeight: "32px"
115116
}
116117
}))
117118

src/login/components/Logos.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const Container = styled.div({
1111
}
1212
})
1313

14-
export default function Logos({ homeUrl }: { homeUrl: string }) {
14+
export default function Logos() {
1515
return (
1616
<Container>
1717
<img src={mitLearnLogo} alt="" height={24} />
Lines changed: 1 addition & 3 deletions
Loading

src/login/components/mit-logo.svg

Lines changed: 2 additions & 10 deletions
Loading

src/login/i18n.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const { useI18n, ofTypeI18n } = i18nBuilder
7373
federatedIdentityExistsMessage:
7474
"User with {0} {1} already exists. Please sign in to account management to link the account.",
7575
emailSentMessage:
76-
"We've emailed your instructions for setting your password. You should receive them shortly.",
76+
"We emailed you instructions for setting your password. You should receive them shortly.",
7777
delegationCompleteHeader: "Sign In Successful",
7878
delegationFailedHeader: "Sign In Failed",
7979
delegationFailedMessage:

src/login/pages/Login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function Login(props: PageProps<Extract<KcContext, { pageId: "log
4444
{social.providers.map(p => (
4545
<SocialProviderButtonLink key={p.alias} id={`social-${p.alias}`} type="button" href={p.loginUrl} variant="bordered" size="large">
4646
{p.iconClasses && <i aria-hidden="true"></i>}
47-
{p.alias === "touchstone-idp" ? <img src={mitLogo} alt="MIT Logo" width={29} /> : null}
47+
{p.alias === "touchstone-idp" ? <img src={mitLogo} alt="MIT Logo" width={40} /> : null}
4848
<span>{p.displayName}</span>
4949
</SocialProviderButtonLink>
5050
))}

src/login/pages/LoginUsername.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default function LoginUsername(props: PageProps<Extract<KcContext, { page
4343
{social.providers.map(p => (
4444
<SocialProviderButtonLink key={p.alias} id={`social-${p.alias}`} type="button" href={p.loginUrl} variant="bordered" size="large">
4545
{p.iconClasses && <i className={clsx(p.iconClasses)} aria-hidden="true"></i>}
46-
{p.alias === "touchstone-idp" ? <img src={mitLogo} width={29} /> : null}
46+
{p.alias === "touchstone-idp" ? <img src={mitLogo} width={40} /> : null}
4747
<span className={clsx(p.iconClasses && "kc-social-icon-text")}>{p.displayName}</span>
4848
</SocialProviderButtonLink>
4949
))}

0 commit comments

Comments
 (0)