diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100644 index 00000000..302263d9 --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1 @@ +Asset 2 \ No newline at end of file diff --git a/components/FormLayout.js b/components/FormLayout.js new file mode 100644 index 00000000..66c0fb15 --- /dev/null +++ b/components/FormLayout.js @@ -0,0 +1,20 @@ +import React from 'react'; +import classNames from 'classnames'; +import { ErrorMessage } from 'formik'; +import styles from './FormLayout.module.css'; + +export default function FormLayout({ className, children }) { + return
{children}
; +} + +export const FormButtons = ({ className, children }) => ( +
{children}
+); + +export const FormError = ({ name }) => ( + {msg =>
{msg}
}
+); + +export const FormRow = ({ children }) =>
{children}
; + +export const FormMessage = ({ children }) =>
{children}
; diff --git a/components/FormLayout.module.css b/components/FormLayout.module.css new file mode 100644 index 00000000..85c61ac8 --- /dev/null +++ b/components/FormLayout.module.css @@ -0,0 +1,48 @@ +.form { + display: flex; + flex-direction: column; + justify-content: center; +} + +.form label { + display: inline-block; + min-width: 100px; +} + +.row { + display: flex; + align-items: center; + position: relative; + margin-bottom: 20px; + line-height: 1.8; +} + +.buttons { + display: flex; + justify-content: center; +} + +.error { + color: var(--gray50); + background: var(--color-error); + font-size: var(--font-size-small); + position: absolute; + display: flex; + justify-content: center; + align-items: center; + top: 0; + left: 100%; + bottom: 0; + margin-left: 10px; + padding: 4px 8px; + border-radius: 4px; +} + +.message { + text-align: center; + margin: 20px 0; + padding: 4px 8px; + border-radius: 4px; + color: var(--gray50); + background: var(--gray800); +} diff --git a/components/Header.js b/components/Header.js index b9ba805b..1fc62eed 100644 --- a/components/Header.js +++ b/components/Header.js @@ -3,6 +3,8 @@ import { useSelector } from 'react-redux'; import classNames from 'classnames'; import Link from 'components/Link'; import UserButton from './UserButton'; +import Icon from './Icon'; +import Logo from 'assets/logo.svg'; import styles from './Header.module.css'; export default function Header() { @@ -12,7 +14,10 @@ export default function Header() {
-
{user ? umami : 'umami'}
+
+ } size="L" className={styles.logo} /> + {user ? umami : 'umami'} +
{user && (
diff --git a/components/Header.module.css b/components/Header.module.css index 575236fc..03f6f93d 100644 --- a/components/Header.module.css +++ b/components/Header.module.css @@ -23,3 +23,7 @@ font-weight: 600; margin-left: 40px; } + +.logo { + margin-right: 12px; +} diff --git a/components/Icon.js b/components/Icon.js index c0073ab0..30bd9081 100644 --- a/components/Icon.js +++ b/components/Icon.js @@ -6,6 +6,7 @@ export default function Icon({ icon, className, size = 'M' }) { return (
svg { + width: 48px; + height: 48px; +} + .large > svg { width: 24px; height: 24px; diff --git a/components/Layout.js b/components/Layout.js index b8c744e7..a2d45cc1 100644 --- a/components/Layout.js +++ b/components/Layout.js @@ -1,9 +1,18 @@ import React from 'react'; +import classNames from 'classnames'; import Head from 'next/head'; import Header from 'components/Header'; import Footer from 'components/Footer'; +import styles from './Layout.module.css'; -export default function Layout({ title, children }) { +export default function Layout({ + title, + children, + header = true, + footer = true, + center = false, + middle = false, +}) { return ( <> @@ -14,9 +23,16 @@ export default function Layout({ title, children }) { rel="stylesheet" /> -
-
{children}
-