-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #625 from danskernesdigitalebibliotek/DDFLSBP-615-…
…efter-registrering-skal-laner-force-logges-ud-og-blive-sendt-til-login-i-adgangsplatformen_separate-release Add design for the registration redirect login message
- Loading branch information
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/stories/Blocks/registration-form-page/RedirectToLoginMessage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { FC } from "react"; | ||
import { Button } from "../../Library/Buttons/button/Button"; | ||
|
||
export interface RedirectToLoginMessageProps { | ||
infoTopText: string; | ||
infoBottomText: string; | ||
buttonText: string; | ||
} | ||
|
||
const RedirectToLoginMessage: FC<RedirectToLoginMessageProps> = ({ | ||
infoTopText, | ||
infoBottomText, | ||
buttonText, | ||
}) => { | ||
return ( | ||
<section className="redirect-to-login-message"> | ||
<p className="redirect-to-login-message__top">{infoTopText}</p> | ||
<p className="redirect-to-login-message__bottom">{infoBottomText}</p> | ||
<Button | ||
buttonType="default" | ||
size="small" | ||
collapsible={false} | ||
disabled={false} | ||
variant="outline" | ||
onClick={() => {}} | ||
classNames="mt-32" | ||
label={buttonText} | ||
/> | ||
</section> | ||
); | ||
}; | ||
|
||
export default RedirectToLoginMessage; |
31 changes: 31 additions & 0 deletions
31
src/stories/Blocks/registration-form-page/RegistrationFormPage.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { ComponentStory } from "@storybook/react"; | ||
import RedirectToLoginMessage, { | ||
RedirectToLoginMessageProps, | ||
} from "./RedirectToLoginMessage"; | ||
|
||
export default { | ||
title: "Blocks / Registration Form Page", | ||
argTypes: { | ||
infoTopText: { | ||
name: "Headline", | ||
defaultValue: | ||
"You are now registered as a user and need to log in again to be able to use the application.", | ||
control: { type: "text" }, | ||
}, | ||
infoBottomText: { | ||
name: "Text", | ||
defaultValue: | ||
"You will be sent to the Adgangsplatformen to log in again in 10 seconds", | ||
control: { type: "text" }, | ||
}, | ||
buttonText: { | ||
name: "Button text", | ||
defaultValue: "Log in", | ||
control: { type: "text" }, | ||
}, | ||
}, | ||
}; | ||
|
||
export const RedirectToLoginMessageExample: ComponentStory< | ||
typeof RedirectToLoginMessage | ||
> = (args: RedirectToLoginMessageProps) => <RedirectToLoginMessage {...args} />; |
18 changes: 18 additions & 0 deletions
18
src/stories/Blocks/registration-form-page/registration-form-page.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.redirect-to-login-message { | ||
padding: $s-lg; | ||
margin-left: auto; | ||
|
||
@include media-query__small { | ||
padding: 300px; | ||
} | ||
|
||
&__top { | ||
@include typography($typo__body-large); | ||
margin-top: $s-md; | ||
} | ||
|
||
&__bottom { | ||
@include typography($typo__body-placeholder); | ||
margin-top: $s-md; | ||
} | ||
} |