How to use the preact-emotion.header function in preact-emotion

To help you get started, we’ve selected a few preact-emotion examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github probablyup / markdown-to-jsx / site.js View on Github external
padding: 1em;
    }

    main {
        display: flex;
        flex-direction: column;
        padding: 3rem 1.5rem 0;
        margin: 0;

        @media all and (min-width: 1024px) {
            padding: 3rem;
        }
    }
`;

const Header = styled.header`
    flex-shrink: 0;
    margin-bottom: 2em;
    text-align: center;

    img {
        height: 100px;
    }
`;

const Description = styled.p`
    font-size: 18px;
    margin-left: auto;
    margin-right: auto;
    max-width: 60vw;

    h1,
github dmitry-korolev / remeal / src / control / components / Header.js View on Github external
import { h } from 'preact'
import styled from 'preact-emotion'
import { createSelector, createStructuredSelector } from 'reselect'
import { Consumer } from '../controlApp'
import { StopWatch } from './StopWatch'
import { Indicator } from './Indicator'
import { Title } from './Title'
import { SettingsDialog } from './SettingsDialog/SettingsDialog'

const Container = styled.header`
  position: relative;
  height: var(--header-height);
  display: flex;

  > * {
    line-height: calc(var(--header-height) - var(--padding) * 2);
    margin: 0;
    padding: var(--padding);
  }
`

const titleSelector = createSelector(
  (state) => state.presentation.title,
  (title) => ({ title })
)