How to use the styled-components function in styled-components

To help you get started, we’ve selected a few styled-components 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 spences10 / blog.scottspence.me / src / components / Header.js View on Github external
`};
  ${media.phone`
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
        'b b b b b b b b b';
    /* background: palevioletred; */
  `};
`

const LinksWrapper = styled.div`
  font-size: 2rem;
  font-weight: 700;
  grid-area: ${props => props.area};
`

const StyledLink = styled(Link)`
  font-family: ${props => props.theme.fontHeader};
  color: ${props => props.theme.fontDark};
  margin: 0.25rem;
  padding: 0.25rem;
`

const Header = props => {
  return (
    
      
        
           <span>{title}</span>} /&gt;
        
      
    
  )
github takefumi-yoshii / react-hooks-ogiri / apps / drag-drop-section / components / items / item / icon.tsx View on Github external
{props.priority === 'high' &amp;&amp; (
      
    )}
    {props.priority === 'middle' &amp;&amp; (
      
    )}
    {props.priority === 'low' &amp;&amp; (
      
    )}
  
)
// ______________________________________________________
//
// @ StyledView

export default styled(View)`
  margin: 10px;
`
github SaraVieira / awesome-talks / src / Pages / Speakers.js View on Github external
import styled from 'styled-components'
import Header from './../Components/Header'
import Query from './../Components/Query'
import SPEAKERS from '../Queries/SPEAKERS'
import GET__SPEAKERS_SEARCH from '../Queries/Local/GET__SPEAKERS_SEARCH'
import { Figure, Img, Caption, Name } from './../Components/Styling/Speaker'
import Nav from './../Components/Nav'
import Filter from '../Utils/search'
import SpeakersMeta from '../Components/MetaTags/Speakers'
import CookieBanner from './../Components/CookieBanner'

const makeLink = name =&gt; `/speaker/${name.replace(/\s+/g, '-').toLowerCase()}`

const makeName = name =&gt; name.split(' ')

const Wrapper = styled(Flex)`
    @media (max-width: 685px) {
        justify-content: center;
    }
`

const Speakers = ({ data: { searchSpeakers } }) =&gt; (
    
        
        <div role="banner">
            <nav>
            <header title="Speakers">
        </header></nav></div>
github Paratii-Video / paratii-portal / src / scripts / components / widgets / tcr / Voting.js View on Github external
import React, { Component, Fragment } from 'react'
import styled from 'styled-components'
import Text from 'components/foundations/Text'
import Title from 'components/foundations/Title'
import ProgressBar, {
  ProgressBarContainer
} from 'components/foundations/ProgressBar'
import TranslatedText from 'components/translations/TranslatedText'

type Props = {
  date: string,
  votesFor: number,
  votesAgainst: number
}

const InfoStatusTitle = styled(Text)`
  display: flex;
  align-items: center;
`

const Voting = styled.div`
  display: flex;
  flex-direction: column;
`

const VotingValuesWrapper = styled.div`
  display: flex;
  justify-content: space-between;
  margin: 30px 0 0;
`

const VotingValue = styled.div`
github outline / outline / app / components / Modal.js View on Github external
overflow-x: hidden;
  overflow-y: auto;
  background: ${props => props.theme.background};
  transition: ${props => props.theme.backgroundTransition};
  padding: 13vh 2rem 2rem;
  outline: none;
`;

const Esc = styled.span`
  display: block;
  text-align: center;
  font-size: 13px;
  height: 1em;
`;

const Close = styled(NudeButton)`
  position: fixed;
  top: 16px;
  right: 16px;
  opacity: 0.75;
  color: ${props => props.theme.text};
  width: auto;
  height: auto;

  &:hover {
    opacity: 1;
  }

  ${breakpoint('tablet')`
    top: 3rem;
    right: 3rem;
  `};
github Alexloof / Next-GraphQL-Blog / client / components / nav.js View on Github external
)}
            {!isAuth &amp;&amp; (
              
                Signup
              
            )}
            {isAuth &amp;&amp; Logout}
          
        
      
    )
  }
}

const StyledMenu = styled(Menu)`
  &amp;&amp;&amp; {
    border-bottom: 2px solid #ffd045;
    padding: 0 15px;
  }
`

const StyledLink = styled.a`
  color: #5f5f5f;
  line-height: 70px;
  padding: 0 2vw;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
`
github ncredinburgh / react-playground-buble / packages / di-ui-styled / src / components / button.js View on Github external
const factory = tag => {
  const Default = styled(tag)`${style}`
  Default.defaultProps = {
    secondary: true,
  }
  return Default
}
github diegohaz / arc / src-example / components / organisms / FeatureList / index.js View on Github external
}
`

const StyledHeading = styled(Heading)`
  text-align: center;
`

const Description = styled(Paragraph)`
  text-align: center;
  margin: 2rem;
  @media screen and (max-width: 640px) {
    margin: 1rem;
  }
`

const StyledFeature = styled(Feature)`
  margin: 1rem;
  @media screen and (max-width: 640px) {
    margin: 0;
  }
`

const FeatureList = ({ ...props }) =&gt; (
  <div>
    Basic stack
    
      It includes everything necessary to build a tipical web app with focus on productivity and developer experience.<br>
      Learn more about the recomended workflow
    
    
      </div>
github react-cosmos / react-cosmos / website / src / Header / MinimizedHeader.tsx View on Github external
const Container = styled.div`
  max-width: ${MAX_HEADER_WIDTH_PX}px;
  height: ${HEADER_HEIGHT_PX}px;
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  transition: 0.4s opacity;
`;

const CosmonautButton = styled(InternalLink)`
  flex-shrink: 0;
  width: ${COSMONAUT_SIZE_PX}px;
  height: ${COSMONAUT_SIZE_PX}px;
  margin-left: ${COSMONAUT_HPADDING_PX}px;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
`;

const HeartButton = styled(InternalLink)`
  flex-shrink: 0;
  width: ${COSMONAUT_SIZE_PX}px;
  height: ${COSMONAUT_SIZE_PX}px;
  margin: 0 ${COSMONAUT_HPADDING_PX}px 0 0;
  background: rgba(231, 0, 138, 0.2);
  border-radius: 50%;