How to use the @emotion/core.css function in @emotion/core

To help you get started, we’ve selected a few @emotion/core 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 lskjs / ux / packages / ui / src / Loaders / BallSpin / BallSpin.styles.js View on Github external
function count(n = 9, start = 1) { // eslint-disable-line consistent-return
  const list = range(start, n).map(i => css`
    &:nth-child(${i}) {
      animation: ${spin} 1s ${delay(0.12, n, i - 1)}s infinite linear;
    }
  `);
  return css(list.join('\n'));
}
github zapier / formatic / demo / future / StyledBuiltInField.js View on Github external
/** @jsx jsx */
import { jsx, css } from '@emotion/core';

import { FormContainer, TextField } from '@/src/future';

const styles = {
  Label: css({
    fontWeight: '600',
  }),
  TextInput: css({
    border: '2px solid black',
  }),
};

function renderTag(renderKey, Tag, props) {
  if (styles[renderKey]) {
    return ;
  }
  return ;
}

function renderComponent(renderKey, Component, props) {
  if (renderKey === 'Field') {
    return ;
  }
  return ;
github bmcmahen / sancho / src / Form.tsx View on Github external
const getInputSizes = (theme: Theme) => ({
  sm: css({
    fontSize: theme.fontSizes[0],
    padding: "0.25rem 0.5rem"
  }),
  md: css({
    fontSize: theme.fontSizes[1],
    padding: "0.5rem 0.75rem"
  }),
  lg: css({
    fontSize: theme.fontSizes[2],
    padding: "0.65rem 1rem"
  })
});
github qantasairways / runway / src / components / Dropdown / index.js View on Github external
export function itemSvgStyles() {
  return css({
    label: 'runway-dropdown__item-svg',
    width: '24px',
    fill: colours.darkerGrey
  });
}
github sw-yx / gatsby-theme-dev-blog / v3 / packages / gatsby-theme-dev-blog / src / pages / index.js View on Github external
function Article({ post, theme }) {
  const articlelink = 'writing/' + post.frontmatter.slug
  return (
    <div>
      <h2>
        <span aria-label="article" role="img">
          ✍️
        </span>
        
          {post.frontmatter.title}
        
      </h2>
      
        {post.excerpt}{' '}</div>
github zapier / formatic / docs / components / CodeBlock.js View on Github external
/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import SyntaxHighlighter from 'react-syntax-highlighter/prism';
import { atomDark } from 'react-syntax-highlighter/styles/prism';

const styles = {
  codeBlock: css({
    fontSize: 14,
  }),
};

const CodeBlock = props =&gt; (
  <div>
    
      {props.children}
    
  </div>
);

export default CodeBlock;
github chakra-ui / chakra-ui / packages / chakra-ui / src / Input / InputStyle.js View on Github external
borderColor: borderColor[mode]
    }
  });
};

const focusStyle = props => {
  const { theme } = props;

  return css({
    [focus]: {
      boxShadow: theme.shadows.outline
    }
  });
};

const readOnlyStyle = css({
  "&[readonly]": {
    backgroundColor: "transparent",
    boxShadow: "none !important",
    userSelect: "all"
  }
});

const sizeStyle = props => {
  const { theme, size } = props;
  return theme.sizes.input[size];
};

const useInputStyle = props => {
  const theme = useTheme();
  const { mode } = useUIMode();
github zapier / formatic / docs / components / Header.js View on Github external
marginBottom: 40,
    ...getMediaQueriesForWidths(
      {
        ...Typography['sub-head'],
        paddingTop: 20,
        paddingBottom: 20,
      },
      {
        ...Typography['main-head'],
        paddingTop: 60,
        paddingBottom: 60,
      }
    ),
  }),
  leadHeader: css({}),
  logo: css({
    display: 'block',
    margin: '0 auto 30px',
    width: 200,
    height: 200,
  }),
  lead: css({
    textAlign: 'center',
    ...Typography['main-head'],
  }),
  title: css({
    ...getMediaQueriesForWidths(
      {
        ...Typography['main-head'],
      },
      {
        ...Typography['mega-head'],