How to use the @emotion/styled.p function in @emotion/styled

To help you get started, we’ve selected a few @emotion/styled 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 emotion-js / emotion / site / src / utils / markdown-styles.js View on Github external
// @flow
/** @jsx jsx */
import { jsx } from '@emotion/core'
import styled from '@emotion/styled'
import css from '@emotion/css'
import { mq, colors, constants, animatedUnderline } from './style'

const textStyles = mq({
  fontSize: [15, 16],
  marginTop: 20,
  color: colors.color,
  fontWeight: 400,
  lineHeight: '1.7'
})

export const p = styled.p(textStyles)

export const code = styled.code(
  textStyles,
  mq({
    backgroundColor: 'rgba(117, 63, 131, 0.07)',
    borderRadius: '0.325rem',
    fontSize: ['80%', '85%'],
    margin: 0,
    padding: '0.2rem 0.325rem'
  })
)

export const pre = styled.pre({
  '& > code': {
    padding: 0
  }
github Nexusoft / NexusInterface / src / shared / components / AboutModal.js View on Github external
marginLeft: 'auto',
  marginRight: 'auto',
  display: 'grid',
  alignItems: 'center',
  gridTemplateColumns: 'auto auto auto',
  gridTemplateRows: 'auto',
  gridGap: '1em',
  textAlign: 'center',
});

const Strong = styled.strong(({ theme }) => ({
  color: theme.mixer(0.875),
  fontWeight: 'bold',
}));

const AgreementContent = styled.p({
  marginLeft: 20,
  marginRight: 20,
  textAlign: 'justify',
});

const About = ({ version, testnet, privateBlockchain }) => (
  
    
      
    
    
      <div>
        
          {APP_VERSION}
        
        </div>
github storybookjs / storybook / lib / ui / src / modules / ui / components / search_box.js View on Github external
value: story,
        id: i,
        kind: val.kind,
      });
    });
  });

  return formattedStories;
};

const SuggestionWrapper = styled.div(
  ({ selected, selectedResultStyle, resultsStyle }) =&gt;
    selected ? selectedResultStyle : resultsStyle,
  { display: 'flex', justifyContent: 'space-between' }
);
const SuggestionValue = styled.p({ margin: 0 });
const SuggestionKind = styled.p({
  opacity: 0.5,
  margin: 0,
  paddingLeft: 10,
  textAlign: 'right',
});

const suggestionTemplate = (props, state, styles, clickHandler) =&gt;
  state.results.map((val, i) =&gt; (
github apollographql / gatsby-theme-apollo / packages / gatsby-theme-apollo-docs / src / components / docset-switcher.js View on Github external
color: 'white',
      backgroundColor: colors.primary,
      p: {
        color: colors.primaryLight
      }
    }
  }
});

export const NavItemTitle = styled.h4({
  marginBottom: 8,
  fontWeight: 600,
  color: 'inherit'
});

export const NavItemDescription = styled.p({
  marginBottom: 0,
  fontSize: 14,
  lineHeight: 1.5,
  color: colors.text3,
  transition: 'color 150ms ease-in-out'
});

const FooterNav = styled.nav({
  display: 'flex',
  alignItems: 'center',
  padding: '16px 24px',
  backgroundColor: colors.background,
  [breakpoints.md]: {
    display: 'block'
  }
});
github apollographql / principled-graphql / src / templates / page.js View on Github external
});

const Chapter = styled.div({
  marginTop: 64
});

const ChapterHeading = styled.h2({
  display: 'flex',
  alignItems: 'center'
});

const SectionTitle = styled.h4({
  marginBottom: 8
});

const SectionDescription = styled.p({
  fontSize: '1rem'
});

const anchorPattern = /<a href="([\w/#-]+)">([\w\s.,-]+)&lt;\/a&gt;/gm;

export default class Page extends Component {
  static propTypes = {
    data: PropTypes.object.isRequired,
    location: PropTypes.object.isRequired
  };

  componentDidMount() {
    window.addEventListener('keydown', this.onKeyDown);

    const hashElement = document.getElementById(
      this.props.location.hash.slice(1)</a>
github bs32g1038 / node-blog / src / components / home / index.tsx View on Github external
'>a': {
        color: '#fff',
        textDecoration: 'none'
    }
}));

const Hr = styled.hr((_) => ({
    maxWidth: '160px',
    height: '1px',
    marginTop: '30px',
    marginBottom: '30px',
    border: 'none',
    backgroundImage: 'linear-gradient(0deg, transparent, #fff, transparent)'
}));

const Description = styled.p((_) => ({
    color: '#fff',
    '>a': {
        color: '#fff',
        textDecoration: 'none'
    }
}));

const UL = styled.ul((_) => ({
    display: 'inline-block',
    position: 'relative',
    margin: '0',
    listStyleType: 'none',
    textAlign: 'center',
    padding: 0
}));
github OpenNeuroOrg / openneuro / packages / openneuro-app / src / scripts / datalad / mutations / delete-button.jsx View on Github external
import styled from '@emotion/styled'

const WarnButton = styled.button({
  flexBasis: '1px',
  flexGrow: '1',
  fontSize: '16px',
  padding: '8px',
})
const WarnButtonContainer = styled.div`
  display: flex;

  button:last-child {
    margin-left: 10px;
  }
`
const WarningText = styled.p({
  color: 'red'
  
})

const DELETE_DATASET = gql`
  mutation deleteDataset($id: ID!) {
    deleteDataset(id: $id)
  }
`

const DeleteDataset = ({ history, datasetId }) => {
  const [ warn, setWarn ] = useState(false)

  const toggleWarn = () => setWarn(!warn)

  return (
github storybookjs / storybook / lib / ui / src / modules / ui / components / search_box.js View on Github external
id: i,
        kind: val.kind,
      });
    });
  });

  return formattedStories;
};

const SuggestionWrapper = styled.div(
  ({ selected, selectedResultStyle, resultsStyle }) =&gt;
    selected ? selectedResultStyle : resultsStyle,
  { display: 'flex', justifyContent: 'space-between' }
);
const SuggestionValue = styled.p({ margin: 0 });
const SuggestionKind = styled.p({
  opacity: 0.5,
  margin: 0,
  paddingLeft: 10,
  textAlign: 'right',
});

const suggestionTemplate = (props, state, styles, clickHandler) =&gt;
  state.results.map((val, i) =&gt; (
     clickHandler(i)}
github ERS-HCL / gatsby-atomic-themes / packages / drupal-app / src / pages / 404.js View on Github external
import React from 'react';

import { SEO, Layout } from '@gatsby-themes/core';
import styled from '@emotion/styled';
const H4 = styled.h4(
	{
		fontSize: 24
	},
	(props) =&gt; ({ color: props.color })
);

const Para = styled.p(
	{
		fontSize: 20
	},
	(props) =&gt; ({ color: props.color })
);

const NotFoundPage = () =&gt; {
	return (
		
			
			<h4>NOT FOUND</h4>
			You just hit a route that doesn't exist... the sadness.
		
	);
};
github Nexusoft / NexusInterface / src / App / Overlays / ExperimentalWarning.js View on Github external
import React from 'react';
import styled from '@emotion/styled';

import Button from 'components/Button';
import { updateSettings } from 'lib/settings';

import FullScreen from './FullScreen';

const Buttons = styled.p({
  marginTop: '3em',
  display: 'flex',
  justifyContent: 'center',
});

const disableExperimentalWarning = () =&gt;
  updateSettings({ experimentalWarningDisabled: true });

const ExperimentalWarning = () =&gt; (
  
    <p>
      {__(
        'IMPROPER USE OF THIS SOFTWARE COULD LEAD TO PERMANENT LOSS OF COIN.'
      )}
    </p>
    <p>{__('BACKUP YOUR WALLET OFTEN AND KEEP YOUR PASSWORDS SAFE.')}</p>