0.1.0 • Published 4 years ago

@maruware/dx-react-grid-formatters v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

dx-react-grid-formatters

Formatters for @devexpress/dx-react-grid

Install

npm i -S @maruware/dx-react-grid-formatters
yarn add @maruware/dx-react-grid-formatters

Example

cd example
yarn install
yarn start

Open http://localhost:3000

Usage

BooleanFormatter

<DataTypeProvider
    for={['isReady']}
    formatterComponent={BooleanFormatter}
/>

UrlFormatter

<DataTypeProvider
    for={['url']}
    formatterComponent={UrlFormatter}
/>

MapChipFormatter

const StatusFormatter = GetMapChipFormatter({
  normal: {
    label: 'Normal',
    color: blueGrey[500]
  },
  warning: {
    label: 'Warning',
    color: amber[500]
  },
  error: {
    label: 'Error',
    color: pink[500]
  }
})
// ...

<DataTypeProvider
    for={['status']}
    formatterComponent={StatusFormatter}
/>

TimeFormatter

<DataTypeProvider
    for={['createdAt']}
    formatterComponent={TimeFormatter}
/>

RelativeTimeFormatter

<DataTypeProvider
    for={['updatedAt']}
    formatterComponent={RelativeTimeFormatter}
/>
0.1.0

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago