How to use the @govuk-react/lib.link.printFriendly function in @govuk-react/lib

To help you get started, we’ve selected a few @govuk-react/lib 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 govuk-react / govuk-react / components / link / src / index.js View on Github external
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { link } from '@govuk-react/lib';

const Link = styled('a')(
  link.common(),
  link.styleDefault,
  link.printFriendly,
  ({ muted }) => (muted ? link.styleMuted : undefined),
  ({ textColour }) => (textColour ? link.styleText : undefined),
  ({ noVisitedState }) => (noVisitedState ? link.styleNoVisitedState : undefined)
);

/**
 *
 * ### Usage
 *
 * Simple
 * ```jsx
 * Example
 * ```
 *
 * It is possible to use this component to style a link from react-router, or reach-router
 * as follows: