1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-07-01 06:11:43 +02:00
market/src/components/molecules/PageHeader.tsx

28 lines
582 B
TypeScript
Raw Normal View History

2020-07-07 23:00:16 +02:00
import React, { ReactElement } from 'react'
import classNames from 'classnames/bind'
2020-05-07 08:03:30 +02:00
import styles from './PageHeader.module.css'
2020-07-07 23:00:16 +02:00
const cx = classNames.bind(styles)
2020-05-07 08:03:30 +02:00
export default function PageHeader({
title,
2020-07-15 14:34:40 +02:00
description,
center
2020-05-07 08:03:30 +02:00
}: {
title: string
description?: string
2020-07-07 23:00:16 +02:00
center?: boolean
}): ReactElement {
const styleClasses = cx({
2020-07-15 14:34:40 +02:00
header: true,
center: center
2020-07-07 23:00:16 +02:00
})
2020-05-07 08:03:30 +02:00
return (
2020-07-07 23:00:16 +02:00
<header className={styleClasses}>
2020-05-07 08:03:30 +02:00
<h1 className={styles.title}>{title}</h1>
{description && <p className={styles.description}>{description}</p>}
</header>
)
}