Skip to content

Commit

Permalink
fix: alert position and responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
pooriamehregan committed Jun 18, 2024
1 parent 97a4aff commit 41c37b1
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.form {
display:flex;
flex-direction:column;
gap:2rem;
display: flex;
flex-direction: column;
gap: 2rem;
}

.textField {
Expand Down Expand Up @@ -33,3 +33,9 @@
.submitButton {
align-self: flex-start;
}

@media (max-width: 576px) {
.textFieldHalfWidth {
width: 100%;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ const DataHunterForm = ({ dictionary }: DataHunterFormProps) => {

return (
<>
<SubmitStatusAlert
dictionary={dictionary}
formStatus={state?.status}
/>
<form
id='data-hunter-form'
name='data-hunter-form'
Expand Down Expand Up @@ -112,6 +108,10 @@ const DataHunterForm = ({ dictionary }: DataHunterFormProps) => {
{dictionary.submitRequest}
</Button>
</form>
<SubmitStatusAlert
dictionary={dictionary}
formStatus={state?.status}
/>
</>
);
};
Expand Down
20 changes: 5 additions & 15 deletions apps/forms/app/[lang]/data-hunter/page.module.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
.contentContainer {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
max-width: 843px;
max-width: var(--breakpoint-x-large);
margin: 5rem auto;
padding: 1rem;
box-sizing: border-box;
min-width: var(--breakpoint-x-small);
}

.contentContainer .paragraph {
.contentContainer {
margin-bottom: 3rem;
}

.paragraph {
text-align: center;
}

@media screen and (max-width: 1200px) {
.contentContainer {
composes: contentContainer;
margin: 5rem 1rem;
}
}
6 changes: 2 additions & 4 deletions apps/forms/app/[lang]/data-hunter/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ const DataHunterPage = async ({ params: { lang } }: Props) => {

const dictionary = await getDictionary(lang);

const {
FDK_BASE_URI
} = process.env;
const { FDK_BASE_URI } = process.env;

const baseUri = FDK_BASE_URI ?? '/';

Expand Down Expand Up @@ -54,7 +52,7 @@ const DataHunterPage = async ({ params: { lang } }: Props) => {
</Heading>
<Paragraph
size='large'
className={styles.paragraph}
spacing
>
{dictionary.dataHunterForm.description}
</Paragraph>
Expand Down
2 changes: 1 addition & 1 deletion apps/frontpage-e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default defineConfig({
},
/* Run your local dev server before starting the tests */
webServer: {
command: 'yarn nx start frontpage',
command: 'yarn nx dev frontpage',
url: 'http://127.0.0.1:3000',
reuseExistingServer: !process.env.CI,
cwd: workspaceRoot,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.alert {
margin-top: 2rem;
width: 97%;
}
1 change: 0 additions & 1 deletion libs/ui/src/lib/container/container.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
display: grid;
grid-template-columns: 1fr 10fr 1fr;
grid-template-areas: ". content .";
min-width: var(--breakpoint-large);
max-width: var(--breakpoint-xxx-large);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
background-color: #1e2b3c;
}

@media (max-width: 1400px) {
@media (max-width: 1440px) {
.desktopLanguageMenu {
display: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
background-color: #1e2b3c;
}

@media (max-width: 1400px) {
@media (max-width: 1440px) {
.desktopHeader {
display: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
display: none;
}

@media (max-width: 1400px) {
@media (max-width: 1440px) {
.mobileLanguageMenu {
display: block;
}
Expand Down
2 changes: 1 addition & 1 deletion libs/ui/src/lib/header/components/mobile/mobile.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
text-decoration: none;
}

@media (max-width: 1400px) {
@media (max-width: 1440px) {
.nav {
display: block;
}
Expand Down
24 changes: 14 additions & 10 deletions libs/ui/src/lib/layout-root/global.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
/* Define layers in specific order */
@layer reset, fds;

@import url("./reset.css");
@import url("@digdir/designsystemet-theme");
@import url("@digdir/designsystemet-css");
@import url('./reset.css');
@import url('@digdir/designsystemet-theme');
@import url('@digdir/designsystemet-css');

/* Small devices such as large phones (640px and up) */

/* breakpoints based on bootstrap's breakpoints */
/*
breakpoints based on designsystem.no breakpoints.
https://github.com/digdir/designsystemet/tree/main/design-tokens/Viewport
*/
:root {
--breakpoint-small: 640px;
--breakpoint-medium: 768px;
--breakpoint-large: 992px;
--breakpoint-x-large: 1200px;
--breakpoint-xx-large: 1400px;
--breakpoint-xxx-large: 1600px;
--breakpoint-x-small: 320px;
--breakpoint-small: 375px;
--breakpoint-medium: 576px;
--breakpoint-large: 768px;
--breakpoint-x-large: 992px;
--breakpoint-xx-large: 1200px;
--breakpoint-xxx-large: 1440px;
--color-fdk-navy: #1e2b3c;
}

Expand Down

0 comments on commit 41c37b1

Please sign in to comment.