How to use the linaria/react.styled.a 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 callstack / component-docs / src / templates / Documentation.js View on Github external
font-size: inherit;
    background-color: transparent;
    border: 0;
  }
`;

const PropItem = styled.div`
  margin: 8px 0;

  & > code {
    font-size: inherit;
    white-space: normal;
  }
`;

const RestPropsLabel = styled.a`
  display: block;
  margin: 24px 0 8px 0;
`;

const REACT_STATIC_METHODS = ['getDerivedStateFromProps'];

const ANNOTATION_OPTIONAL = '@optional';
const ANNOTATION_INTERNAL = '@internal';
const ANNOTATION_EXTENDS = '@extends';

const getTypeName = (type: TypeAnnotation) => type.raw || type.name || '';

const hasAnnotation = (item: any, annotation: string) =>
  // eslint-disable-next-line no-nested-ternary
  item.description
    ? item.description.startsWith(annotation)
github callstack / component-docs / src / templates / EditButton.js View on Github external
/* @flow */

import * as React from 'react';
import { styled } from 'linaria/react';

type Props = {
  filepath: string,
  github?: string,
};

const EditButtonContainer = styled.a`
  display: block;
  position: absolute;
  top: 0;
  right: 48px;
  padding: 30px;
  z-index: 10;
  color: inherit;

  &:focus,
  &:hover,
  &:active {
    color: inherit;
  }

  @media (min-width: 640px) {
    padding: 32px;
github callstack / linaria / website / src / components / Header.js View on Github external
height: 48px;
    margin: 0;
    display: inline-block;
    vertical-align: middle;
  }
`;

const Links = styled.ul`
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
  align-items: center;
`;

const LinkItem = styled.a`
  display: block;
  font-size: 1.2em;
  font-weight: 700;
  padding: 24px 16px;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
  transition: 200ms;

  &:hover {
    color: inherit;
  }

  @supports (-webkit-background-clip: text) {
    background-image: ${constants.gradient};
    /* stylelint-disable-next-line property-no-vendor-prefix */
github callstack / react-native-paper / docs / pages / src / Home.js View on Github external
const Container = styled.div`
  width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
`;

const Buttons = styled.div`
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  margin: 16px -8px;
  min-width: 0;
`;

const Button = styled.a`
  appearance: none;
  margin: 8px;
  min-width: 120px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 16px;
  border-width: 1px;
  border-style: solid;
  border-radius: 3px;
  cursor: pointer;
  transition: 0.3s;