How to use the theme-ui.css function in theme-ui

To help you get started, we’ve selected a few theme-ui 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 blocks / blocks / packages / mdx / editor / src / components / ui / Dropdown.js View on Github external
/** @jsx jsx */
import { jsx, Global } from '@emotion/core'
import { css } from 'theme-ui'
import { Menu, MenuButton, MenuList, MenuItem } from '@reach/menu-button'

// css prop doesn't work with reach ui
// styles must be global due to how portals are used
const styles = css({
  ':root': {
    '--reach-menu-button': 1
  },
  '[data-reach-menu]': {
    display: 'block',
    position: 'absolute'
  },
  '[data-reach-menu-list]': {
    display: 'block',
    position: 'relative',
    whiteSpace: 'nowrap',
    border: '1px solid lightgray',
    backgroundColor: 'white',
    outline: 'none',
    zIndex: 101
  },
github MunifTanjim / gatsby-theme-dox / theme / src / components / layout.js View on Github external
function Layout({ children, location }) {
  const [sidebar, sidebarOpen, setSidebarOpen, sidebarToggler] = useSidebar()

  const { theme } = useThemeUI()

  return (
    
      

      

      
        Skip to main content
github blocks / blocks / packages / editor / src / components / CodeBlock.js View on Github external
import React from 'react'
import styled from '@emotion/styled'
import { css } from 'theme-ui'

const Pre = styled.pre(
  css({
    bg: 'lightgray',
    p: 3,
    fontFamily: 'monospace'
  })
)

export default ({ children, ...props }) =&gt; <pre>{children}</pre>
github component-driven / react-design-tokens / src / components / SwatchToken.jsx View on Github external
function SwatchToken({ color = "text", css: componentCSS, ...rest }) {
	return (
		<h3>
	);
}
</h3>
github component-driven / react-design-tokens / src / components / SwatchValue.jsx View on Github external
function SwatchValue({ color = "secondary", css: componentCSS, ...rest }) {
	return (
		<p>
	);
}
</p>