How to use the linaria/react.styled function in linaria

To help you get started, we’ve selected a few linaria 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 zerobias / effector / website / editor / src / share / styled.js View on Github external
`

export const SharedUrl = styled.input`
  border-radius: 2px;
  background: #fff;
  padding: 0.5rem 1rem;
  border: none;
  outline: none;
  width: 100%;

  &[value=''] {
    visibility: hidden;
  }
`

export const ShareButton = styled(Button)`
  border-radius: 2px;
  padding: 0.5rem 1rem;
  border-width: 0;
  margin: 1rem;
  align-self: center;
`

export const ShareGroup = styled.div`
  width: calc(100% - 1.5rem * 2);
  border-left: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-wrap: wrap;
  grid-column: 3 / span 1;
  grid-row: 3 / span 2;
github padraigfl / videojs-react-course-assistant / src / components / VideoPlayer / VideoPlayer.js View on Github external
flex-grow: 1;
  @media (min-width: 1000px) and (min-height: 800px) {
    min-height: 50vh;
    margin: 0px 4px;
  }
`;

const videoStyles = css`
  flex-grow: 1;
  width: 100%;
  @media (max-width: 1000px) and (min-height: 1000px) {
    min-height: 50vh;
  }
`;

const Description = styled('div')`
  overflow: auto;
  background-color: ${colors.dark1};
  color: ${colors.accent};
  padding: ${spacings.s}px;
  margin-top: ${spacings.xs}px;
  max-height: 200px;
`;

export default class Video extends React.Component {
  static contextType = CourseContext;

  videoRef = React.createRef();

  state = {};

  currentDescription = () => {
github padraigfl / videojs-react-course-assistant / src / components / Heading / SettingsModal.js View on Github external
import ReactDOM from 'react-dom';
import { styled } from 'linaria/react';
import { colors, spacings } from '../../constants/styles';
import { CancelButton } from '../styledShared';

const Overlay = styled('div')`
  position: absolute;
  left: 0px;
  top: 0px;
  height: 100%;
  width: 100%;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
`;
const Settings = styled('div')`
  position: relative;
  background-color: ${colors.light};
  margin: auto;
  width: 90%;
  max-width: 400px;
  padding: ${spacings.m}px;
  display: block;
`;

const SettingsModal = props => {
  return props.display
    ? ReactDOM.createPortal(
        
           e.stopPropagation()}>
            {props.children}
github padraigfl / videojs-react-course-assistant / src / components / styledShared / index.js View on Github external
max-height: 100px;
  padding: ${spacings.xs}px;
  box-shadow: 0px 0px 0px 1px ${colors.accent};
  background-color: ${colors.dark1};
  overflow: hidden;
  a {
    display: block;
    color: ${colors.brand};
    font-weight: bold;
    &:hover {
      color: ${colors.accent};
    }
  }
`;

export const Header = styled('header')`
  margin: 0px;
  padding: ${spacings.xs}px;
  font-size: ${spacings.m}px;
  font-weight: bold;
  color: ${colors.light};
  background-color: ${colors.brand};
  display: flex;
  &.invert {
    color: ${colors.brand};
    background-color: ${colors.light};
  }
  @media (max-width: 500px) {
    font-size: ${spacings.s}px;
  }
`;
github callstack / linaria / website / src / components / Header.js View on Github external
<li>
          
            GitHub
          
        </li>
      
    
  );
}

const NavBar = styled(Container)`
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  ${media.medium} {
    flex-direction: row;
  }
`;

const LogoImage = styled.img`
  height: 64px;
  margin: 16px auto;
  display: block;

  ${media.medium} {
github callstack / linaria / website / src / components / Footer.js View on Github external
return (
    
      
        <p>© 2017 Callstack.io</p>
      
    
  );
}

const FooterContainer = styled.div`
  margin-top: 100px;
  padding: 30px 0;
  font-size: 0.9em;
`;

const Inner = styled(Container)`
  display: flex;
`;
github padraigfl / videojs-react-course-assistant / src / components / styledShared / index.js View on Github external
import { styled } from 'linaria/react';
import { colors, spacings } from '../../constants/styles';

export const ListSection = styled('section')`
  max-width: 350px;
  width: 30%;
  min-width: 250px;
  overflow-y: auto;
  background-color: ${colors.dark1};
  display: flex;
  flex-direction: column;
  max-height: 100%;
`;

export const List = styled('ul')`
  position: relative;
  overflow: auto;
  flex-grow: 1;
  padding-left: 0px;
  margin-top: 0px;
  margin-bottom: 0px;
  &:after {
    content: '';
    position: fixed;
    bottom: 0px;
    width: 100%;
    box-shadow: 0px 0px 10vh 5vh ${colors.dark1};
  }
`;

export const ListEntry = styled('li')`
github callstack / linaria / website / src / components / Features.js View on Github external
justify-content: space-around;
    margin-left: -30px;
    margin-right: -30px;
  }
`;

const Item = styled.div`
  text-align: center;

  ${media.medium} {
    padding: 0 30px;
    flex: 1;
  }
`;

const Title = styled(Heading)`
  text-transform: uppercase;
  margin: 1em 0;
  color: ${theme.primary};
`;

const Figure = styled.figure`
  display: flex;
  align-items: flex-end;
  margin: 0 auto;
  width: 100%;
  max-width: 260px;
  height: 200px;
`;

const FigureImage = styled.img`
  width: 100%;
github padraigfl / videojs-react-course-assistant / src / components / VideoPlayer / VideoPlayer.js View on Github external
import React from 'react';
import { css } from 'linaria';
import { styled } from 'linaria/react';
import VideoComponent from './_Video';

import CourseContext from '../../context';
import { Header } from '../styledShared';
import { spacings, colors } from '../../constants/styles';

const VideoSection = styled('section')`
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  @media (min-width: 1000px) and (min-height: 800px) {
    min-height: 50vh;
    margin: 0px 4px;
  }
`;

const videoStyles = css`
  flex-grow: 1;
  width: 100%;
  @media (max-width: 1000px) and (min-height: 1000px) {
    min-height: 50vh;
  }
`;
github callstack / component-docs / src / templates / Sidebar.js View on Github external
const LogoImage = styled.img`
  display: block;
  height: 48px;
  width: auto;
  margin: 32px 32px 0;
`;

const SeparatorItem = styled.hr`
  border: 0;
  background-color: rgba(0, 0, 0, 0.04);
  height: 1px;
  margin: 20px 0;
`;

const LinkItem = styled(Link)`
  display: block;
  padding: 12px 0;
  text-decoration: none;
  color: #888;
  line-height: 1;

  &:hover {
    color: #111;
    text-decoration: none;
  }

  &[data-selected='true'] {
    color: #333;
    color: var(--theme-primary-color);

    &:hover {