项目作者: FDMediagroep

项目描述 :
ReactJS H1 component
高级语言: TypeScript
项目地址: git://github.com/FDMediagroep/fdmg-ts-react-h1.git
创建时间: 2017-11-14T12:36:13Z
项目社区:https://github.com/FDMediagroep/fdmg-ts-react-h1

开源协议:

下载


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

fdmg-ts-react-h1

Build Status
Coverage Status
npm version
Greenkeeper badge

ReactJS H1 component. This component renders an H1 header.
You might think it silly to have this as a separate component. But when you use an H1-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-h1

or

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

Usage

TypeScript

  1. import * as React from 'react';
  2. import H1 from '@fdmg/ts-react-h1';
  3. export default class foo {
  4. public state: any;
  5. public props: any;
  6. constructor(props: any) {
  7. super(props);
  8. this.props = props;
  9. }
  10. render() {
  11. return (<H1 className={'css-class-name'}>title</H1>);
  12. }
  13. }

Resulting HTML

  1. <h1 class="css-class-name">title</h1>