This package has been deprecated

Author message:

Superseded by @fdmg/design-system. See: https://github.com/FDMediagroep/fd-design-system

@fdmg/ts-react-anchor
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

fdmg-ts-react-anchor

Build Status Coverage Status npm version Greenkeeper badge

ReactJS Anchor component. This component renders an Anchor header. You might think it silly to have this as a separate component. But when you use an Anchor-element multiple times in your project then having that as a component might eventually save you some bytes.

Installation

  • Run npm i --save-dev @fdmg/ts-react-anchor

or

  • Run yarn add @fdmg/ts-react-anchor --dev

Usage

TypeScript

import * as React from 'react';
import A from 'fdmg-ts-react-anchor';

export default class foo {
    public state: any;
    public props: any;

    constructor(props: any) {
        super(props);
        this.props = props;
    }

    render() {
        return (<span>
            <A className={'css-class-name'}>Anchor text</A>
            <A className={'css-class-name'} title='Title text'>Anchor text</A>
            <A className={'css-class-name'} ariaLabel='ARIA-label text'>Anchor text</A>
            <A className={'css-class-name'} title='Title text' ariaLabel='ARIA-label text'>Anchor text</A>
            <A href="https://fd.nl" 
                className={'css-class-name'} 
                title='Title text' 
                ariaLabel='ARIA-label text' 
                target="_blank" 
                tabIndex='2'>Anchor text</A>
        </span>);
    }
}

Resulting HTML

<span>
    <a class="css-class-name" aria-label="Anchor text" tabIndex="0">Anchor text</a>
    <a class="css-class-name" aria-label="Title text" tabIndex="0">Anchor text</a>
    <a class="css-class-name" aria-label="ARIA-label text" tabIndex="0">Anchor text</a>
    <a class="css-class-name" aria-label="ARIA-label text" tabIndex="0">Anchor text</a>
    <a href="https://fd.nl" class="css-class-name" aria-label="ARIA-label text" target="_blank" tabIndex="2">Anchor text</a>
</span>

Readme

Keywords

none

Package Sidebar

Install

npm i @fdmg/ts-react-anchor

Weekly Downloads

1

Version

1.0.8

License

ISC

Unpacked Size

166 kB

Total Files

13

Last publish

Collaborators

  • dirk-straat
  • willem_liu
  • sapulidi