WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit d69e5dd

Browse files
committed
style(settings): General style updates
Because: * Switching design to text-start default instead of text-center * Some images were cut off on mobile This commit: * Update style for AppLayout * Update image styling * Various tweaks to accomodate change to text-start * Set size for Mozilla logo in Storybook sidebar * Replace placeholder image used in storybooks * Increase spacing below primary buttons Closes #FXA-10613
1 parent a1b137c commit d69e5dd

File tree

76 files changed

+161
-154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+161
-154
lines changed

packages/fxa-react/styles/flows.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
/* Does not specify text-align */
1010
.card-base {
11-
@apply relative w-full border border-transparent mobileLandscape:w-120 mobileLandscape:bg-white rounded-xl px-8 pb-12 pt-9 mobileLandscape:shadow-card-grey-drop mb-6;
11+
@apply relative w-full border border-transparent mobileLandscape:w-120 mobileLandscape:bg-white rounded-xl px-8 py-9 mobileLandscape:shadow-card-grey-drop mb-6;
1212
}
1313

1414
.card {
15-
@apply card-base text-center;
15+
@apply card-base;
1616

1717
/* HACK until content-server no longer needs .card, otherwise component classes take precedence */
1818
&.card-xl {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
<link rel="shortcut icon" href="./favicon.ico" />
2+
<style>
3+
/* Adjust the max size for the brand image */
4+
.sidebar-container img {
5+
max-width: 200px; /* Customize max width */
6+
max-height: 50px; /* Customize max height */
7+
object-fit: contain;
8+
}
9+
</style>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

packages/fxa-settings/src/components/AppLayout/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ type AppLayoutProps = {
1515
title?: string;
1616
children: React.ReactNode;
1717
widthClass?: string;
18-
cardClass?: string;
1918
};
2019

2120
export const AppLayout = ({
2221
title,
2322
children,
2423
widthClass,
25-
cardClass = 'card',
2624
}: AppLayoutProps) => {
2725
const { l10n } = useLocalization();
2826

@@ -53,7 +51,7 @@ export const AppLayout = ({
5351
</header>
5452
<main className="mobileLandscape:flex mobileLandscape:items-center mobileLandscape:flex-1">
5553
<section>
56-
<div className={classNames(cardClass, widthClass)}>{children}</div>
54+
<div className={classNames('card', widthClass)}>{children}</div>
5755
</section>
5856
</main>
5957
</div>

packages/fxa-settings/src/components/ButtonDownloadRecoveryKeyPDF/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export const ButtonDownloadRecoveryKeyPDF = ({
145145
<>
146146
<FtlMsg id="recovery-key-download-button-v3">
147147
<button
148-
className="cta-primary cta-xl w-full"
148+
className="cta-primary cta-xl w-full mt-4"
149149
onClick={async () => {
150150
logViewEvent(`flow.${viewName}`, `recovery-key.download-option`);
151151
await downloadFile();

packages/fxa-settings/src/components/ChooseWhatToSync/index.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,14 @@ const ChooseWhatToSync = ({
3232
return (
3333
<>
3434
<FtlMsg id="choose-what-to-sync-prompt-2">
35-
<h2 className="font-normal mb-4 text-base text-center">
36-
Choose what to sync
37-
</h2>
35+
<h2 className="mb-2 font-bold">Choose what to sync</h2>
3836
</FtlMsg>
39-
<ul className="flex flex-wrap text-start text-sm mb-4 ltr:mobileLandscape:ml-6 rtl:mobileLandscape:mr-6">
37+
<ul className="flex flex-wrap text-sm mb-4">
4038
{offeredSyncEngineConfigs.map((engineConfig) => {
4139
return (
4240
<li
4341
key={engineConfig.id}
44-
className="flex-50% rtl:mobileLandscape:pr-6 ltr:mobileLandscape:pl-6 rtl:pr-3 ltr:pl-3"
42+
className="basis-1/2 mobileLandscape:ps-4 pe-2"
4543
>
4644
<FtlMsg id={engineConfig.ftlId} attrs={{ label: true }}>
4745
<InputCheckboxBlue

packages/fxa-settings/src/components/DataBlock/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@ export const DataBlock = ({
6969
<div
7070
className={classNames(
7171
'relative flex font-mono text-center text-sm font-bold text-black bg-gradient-to-tr from-blue-600/10 to-purple-500/10 border border-transparent',
72-
valueIsArray ? 'max-w-sm py-4' : 'max-w-lg',
73-
valueIsArray && !isInline && ' py-5',
72+
valueIsArray ? 'max-w-sm' : 'max-w-lg',
7473
isInline
7574
? 'flex-nowrap w-full rounded py-2 px-3'
76-
: 'flex-wrap mb-8 rounded-lg px-6'
75+
: 'flex-wrap mb-8 rounded-lg px-6 py-4'
7776
)}
7877
data-testid={dataTestId}
7978
{...{ onCopy }}

packages/fxa-settings/src/components/FormPassword/index.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { LocationProvider } from '@reach/router';
88
import FormPassword from '.';
99
import { Meta } from '@storybook/react';
1010
import { withLocalization } from 'fxa-react/lib/storybooks';
11-
import { MockSettingsAppLayout } from '../Settings/AppLayout/mocks';
11+
import { MockSettingsAppLayout } from '../Settings/SettingsLayout/mocks';
1212

1313
export default {
1414
title: 'Components/FormPassword',

packages/fxa-settings/src/components/InlineRecoveryKeySetupCreate/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const InlineRecoveryKeySetupCreate = ({
5656
</FtlMsg>
5757
</h1>
5858

59-
<RecoveryKeyImage className="my-6 mx-auto" />
59+
<RecoveryKeyImage />
6060

6161
<h2 className="font-bold text-xl mb-5">
6262
<FtlMsg id="inline-recovery-key-setup-create-subheader">

packages/fxa-settings/src/components/InlineRecoveryKeySetupCreate/mocks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import InlineRecoveryKeySetupCreate from '.';
77
import AppLayout from '../AppLayout';
88

99
export const Subject = () => (
10-
<AppLayout cardClass="card-base">
10+
<AppLayout>
1111
<InlineRecoveryKeySetupCreate
1212
createRecoveryKeyHandler={() =>
1313
Promise.resolve({

0 commit comments

Comments
 (0)