1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-28 00:27:49 +02:00

add global banner

This commit is contained in:
Matthias Kretschmann 2020-10-26 17:24:45 +01:00
parent c2a247b605
commit 1a621becd5
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 14 additions and 3 deletions

View File

@ -14,7 +14,7 @@
}
.main {
padding: calc(var(--spacer) * 2) 0;
padding: var(--spacer) 0 calc(var(--spacer) * 2) 0;
/* sticky footer technique */
flex: 1;

View File

@ -5,6 +5,7 @@ import PageHeader from './molecules/PageHeader'
import styles from './Layout.module.css'
import Seo from './atoms/Seo'
import Container from './atoms/Container'
import Alert from './atoms/Alert'
export interface LayoutProps {
children: ReactNode
@ -28,6 +29,12 @@ export default function Layout({
<Seo title={title} description={description} uri={uri} />
<Header />
<Alert
text="Given the beta status, publishing on Rinkeby first is strongly recommended. [Learn about the market](https://blog.oceanprotocol.com)."
state="info"
/>
<main className={styles.main}>
<Container>
{title && !noPageHeader && (

View File

@ -26,10 +26,13 @@
}
.text {
margin-bottom: 0;
font-size: var(--font-size-small);
}
.text p:last-child {
margin-bottom: 0;
}
.action {
margin-top: calc(var(--spacer) / 2);
}

View File

@ -1,6 +1,7 @@
import React, { ReactElement, FormEvent } from 'react'
import styles from './Alert.module.css'
import Button from './Button'
import Markdown from './Markdown'
export default function Alert({
title,
@ -19,7 +20,7 @@ export default function Alert({
return (
<div className={`${styles.alert} ${styles[state]}`}>
{title && <h3 className={styles.title}>{title}</h3>}
<p className={styles.text}>{text}</p>
<Markdown className={styles.text} text={text} />
{action && (
<Button
className={styles.action}