Skip to content

Commit

Permalink
Merge pull request #625 from danskernesdigitalebibliotek/DDFLSBP-615-…
Browse files Browse the repository at this point in the history
…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
spaceo committed May 8, 2024
2 parents 9455504 + 470bb36 commit 47fee90
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
1 change: 1 addition & 0 deletions base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
@import "./src/stories/Blocks/reservation-page/reservation-page-skeleton";
@import "./src/stories/Blocks/loan-page/loan-page-skeleton";
@import "./src/stories/Blocks/registration-page/registration-page";
@import "./src/stories/Blocks/registration-form-page/registration-form-page";
@import "./src/stories/Blocks/form/form";

@import "./src/styles/scss/shared";
Expand Down
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;
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} />;
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;
}
}

0 comments on commit 47fee90

Please sign in to comment.