diff --git a/src/components/PageLayout/PageLayout.tsx b/src/components/PageLayout/PageLayout.tsx index 0130a89e..67dc2c11 100644 --- a/src/components/PageLayout/PageLayout.tsx +++ b/src/components/PageLayout/PageLayout.tsx @@ -3,7 +3,7 @@ import Header from '../Header/Header' import SidebarModal from '../SidebarModal/SidebarModal' import styles from './pagelayout.module.scss' -import { Title, LeadParagraph } from '@statisticsnorway/ssb-component-library' +import { Title, LeadParagraph, Input, Dialog, Dropdown } from '@statisticsnorway/ssb-component-library' interface PageLayoutProps { title: string @@ -19,7 +19,37 @@ export default function PageLayout({ title, description, button, content }: Page
{/* TODO: Remove after testing; or implement a temporary button that toggles this in one of the pages */} - + +

Legg person til teamet

+

Navn

+ + +

Rolle(r)

+ + +
+ + Det kan ta litt tid før du ser endringen. + + + } + />
{title} {button} diff --git a/src/components/PageLayout/pagelayout.module.scss b/src/components/PageLayout/pagelayout.module.scss index 0dc3d565..e6b72234 100644 --- a/src/components/PageLayout/pagelayout.module.scss +++ b/src/components/PageLayout/pagelayout.module.scss @@ -22,4 +22,8 @@ .tableTitle { margin: 2.5rem 0; +} + +.modalInfoDialog { + padding-top: 5rem;//TODO: add some later } \ No newline at end of file diff --git a/src/components/SidebarModal/SidebarModal.tsx b/src/components/SidebarModal/SidebarModal.tsx index 03fefa8b..40761e43 100644 --- a/src/components/SidebarModal/SidebarModal.tsx +++ b/src/components/SidebarModal/SidebarModal.tsx @@ -1,16 +1,46 @@ import styles from './sidebar.module.scss' import { useState } from 'react' -import { Link } from '@statisticsnorway/ssb-component-library' +import { Title, Link, Button } from '@statisticsnorway/ssb-component-library' import { X } from 'react-feather' +interface SidebarHeader { + modalType: string + modalTitle: string + modalDescription: string +} + +const SidebarModalHeader = ({modalType, modalTitle, modalDescription}: SidebarHeader): JSX.Element => { + return ( +
+
{modalType}
+

{modalTitle}

+

{modalDescription}

+
+ ) +} + +interface SidebarFooter { + submitButtonText: string + handleClose?: () => void +} + +const SidebarModalFooter = ({submitButtonText, handleClose}: SidebarFooter): JSX.Element => { + return ( +
+ Avbryt +
+
+ ) +} + interface SidebarModal { - header?: JSX.Element + header: SidebarHeader body?: JSX.Element - button?: JSX.Element + footer: SidebarFooter } -const SidebarModal = ({ header, body, button }: SidebarModal) => { +const SidebarModal = ({ header, footer, body }: SidebarModal) => { const [isOpen, setOpen] = useState(true) const handleClose = () => { @@ -21,20 +51,17 @@ const SidebarModal = ({ header, body, button }: SidebarModal) => { return (
- {/* TODO: Should this be wrapped around button? If yes, remove default styling on button */} - {header} + {/* TODO: Should this be wrapped around button? If yes, remove default styling on button */} +
{/* Form goes here */} {body}
-
- Avbryt - {button} -
+
) } diff --git a/src/components/SidebarModal/sidebar.module.scss b/src/components/SidebarModal/sidebar.module.scss index 3b67369d..7879ef88 100644 --- a/src/components/SidebarModal/sidebar.module.scss +++ b/src/components/SidebarModal/sidebar.module.scss @@ -1,40 +1,81 @@ @use '@statisticsnorway/ssb-component-library/src/style/variables' as variables; .container { - width: 20vw; - height: 100%; + width: 25vw; + height: 100vh; background-color: variables.$ssb-white; border-left: 1px solid variables.$ssb-dark-2; - position: absolute; + position: fixed; top: 0; right: 0; z-index: 1; + display: flex; + flex-direction: column; .hide { display: none; } - .header { + button { + background: none; + color: inherit; + border: none; + padding: 0; + font: inherit; + cursor: pointer; + outline: inherit; + float: right; + } + + .xIcon { + color: variables.$ssb-green-4; + } + + .body { + background-color: rgb(236,254,236); + border-bottom: 1px solid #d4d4d4; + overflow: auto; + > * { + padding: 1rem; + } + } + + .modalHeader { + height: 10%; + display: flex; + flex-direction: column; + justify-content: center; + padding-top: 5rem; + margin-left: 1rem; + margin-bottom: 3rem; + button { - background: none; - color: inherit; - border: none; + margin: 0; padding: 0; - font: inherit; - cursor: pointer; - outline: inherit; + float: right; } - .xIcon { - color: variables.$ssb-green-4; + > * > * { + padding: 0; + margin: 0; } - } - .body {} - .footer{} - - // TODO: Add styling for mobile - @media #{variables.$mobile} { + .modalType {} + .modalTitle {} + .modalDescription {} + } + .modalFooter { + height: 10%; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + margin-left: 2.5rem; + margin-right: 2.5rem; + margin-top: 2rem; } + + // TODO: Add styling for mobile + @media #{variables.$mobile} {} }