项目作者: FDMediagroep

项目描述 :
ReactJS H2 component
高级语言: TypeScript
项目地址: git://github.com/FDMediagroep/fdmg-ts-react-h2.git
创建时间: 2017-11-16T08:23:18Z
项目社区:https://github.com/FDMediagroep/fdmg-ts-react-h2

开源协议:

下载


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

fdmg-ts-react-h2

Build Status
Coverage Status
npm version
Greenkeeper badge

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

or

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

Usage

TypeScript

  1. import * as React from 'react';
  2. import H2 from 'fdmg-ts-react-h2';
  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 (<H2 className={'css-class-name'}>title</H2>);
  12. }
  13. }

Resulting HTML

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