mnr-decorator
v1.0.4
Published
Class-based with Typescript / ES6 / ES5 using decorators.
Maintainers
Readme
MNR Decorator
A sub module for rendering table or form
Installation
The package can be installed via npm:
npm install mnr-decorator --saveOr via yarn:
yarn add mnr-decoratorUssage
import React, { Component } from 'react'
import { ColumnSpec } from 'mnr-decorator'
export class ListPage extends Component {
@ColumnSpec({ label: 'Type', isFilter: 'multi' })
readonly type: string
@ColumnSpec({ label: 'Subject', isFilter: 'single' })
readonly subject: string
@ColumnSpec({ label: 'Create Date', isFilter: 'date' })
readonly createDate: number | string
render() {
return <h1>Hello</h1>
}
}
