diff --git a/web/e.cash/components/h2/index.js b/web/e.cash/components/h2/index.js --- a/web/e.cash/components/h2/index.js +++ b/web/e.cash/components/h2/index.js @@ -1,14 +1,24 @@ +// Copyright (c) 2023 The Bitcoin developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + import GlitchText from '/components/glitch-text'; import Image from 'next/image'; import h2graphic from '/public/images/h2-graphic.svg'; import { StyledH3, StyledH2, H2Image } from './styles'; -export default function H2({ subtext, text }) { +/** + * Return a styled h2, styled h3 and decorative image + * @param {string} subtect h3 string to render + * @param {string} text h2 string to render + * @param {boolean} center optional value to center the image + */ +export default function H2({ subtext, text, center }) { return ( <> {subtext} - + eCash diff --git a/web/e.cash/components/h2/styles.js b/web/e.cash/components/h2/styles.js --- a/web/e.cash/components/h2/styles.js +++ b/web/e.cash/components/h2/styles.js @@ -30,6 +30,8 @@ position: absolute; bottom: -40px; left: 0; + right: ${props => (props.center ? '0' : 'unset')}; + margin: ${props => (props.center ? 'auto' : 'unset')}; ${props => props.theme.filters.grayscale}; ${props => props.theme.breakpoint.medium} { width: 300px; diff --git a/web/e.cash/pages/index.js b/web/e.cash/pages/index.js --- a/web/e.cash/pages/index.js +++ b/web/e.cash/pages/index.js @@ -103,7 +103,7 @@ -

+