npm install react.mdl
[![NPM version][npm-img]][npm-url]
[![License][license-img]][license-url]
[![Dependency status][david-img]][david-url]
* Try haoxins/react-mdc
React Components for google/material-design-lite v1
* DateTimePicker
- Props
* See chmln/flatpickr
- Example
``jsx`
* BadgeProps
-
* className: string
* background: bool
* overlap: bool
* href: string
- Example`
jsx`
* ButtonProps
-
* className: string
* floating: bool
* colored: bool
* primary: bool
* ripple: bool
* raised: bool
* accent: bool
* icon: bool
* mini: bool
- Example`
jsx`
* CheckboxProps
-
* className: string
* label: string
* ripple: bool
* id: string
- Example`
jsx`
* ProgressProps
-
* indeterminate: bool,
* className: string,
* progress: number,
* buffer: number,
- Example`
jsx`
* RadioProps
-
* className: string,
* label: string,
* name: string,
* ripple: bool,
* id: string
- Example`
jsx`
* SliderProps
-
* className: string
- Example`
jsx`
* SpinnerProps
-
* singleColor: bool
* className: string
* active: bool
- Example`
jsx`
* SwitchProps
-
* className: string
* label: string
* ripple: bool
* id: string
- Example`
jsx`
* TagProps
-
* onClose: func,
* color: string,
* name: string,
- Example`
jsx`
* TextFieldProps
-
* className: string,
* expandable: bool,
* floating: bool,
* pattern: string,
* label: string,
* error: string
- Example`
jsx`
* TextareaProps
-
* className: string
* label: string
* id: string
- Example`
jsx`
* TooltipProps
-
* className: string
* htmlFor: string
* large: bool
- Example`
jsx`
hello world
* MenuProps
-
* direction: string
* icon: string
- Example`
jsx
*
Tabs
- Props
* defaultActiveKey: string
* onTabClick: func -
Example
`jsx
hello
world
go go go
`*
Table
- Props
* dataSource: array.isRequired,
* columns: array.isRequired,
* className: string,
* selectable: bool -
Example
* basic
`jsx
const dataSource = [{
name: 'haoxin',
age: 18,
address: 'Shanghai'
}, {
name: 'luqiang',
age: 22,
address: 'Hangzhou'
}] const columns = [{
title: 'name',
dataIndex: 'name',
}, {
title: 'age',
dataIndex: 'age',
}, {
title: 'address',
dataIndex: 'address',
key: 'address'
}]
` * custom
render
`jsx
const dataSource = [{
name: 'haoxin',
age: 18,
address: 'Shanghai'
}, {
name: 'luqiang',
age: 22,
address: 'Hangzhou'
}] const columns = [{
title: 'name',
dataIndex: 'name',
render: name => {name}
}, {
title: 'age',
dataIndex: 'age'
}, {
title: 'address',
dataIndex: 'address',
render(address, record) {
return (
{address + '. ' + record.name}
)
}
}]
``[npm-img]: https://img.shields.io/npm/v/react.mdl.svg?style=flat-square
[npm-url]: https://npmjs.org/package/react.mdl
[travis-img]: https://img.shields.io/travis/coderhaoxin/react.mdl.svg?style=flat-square
[travis-url]: https://travis-ci.org/coderhaoxin/react.mdl
[codecov-img]: https://img.shields.io/codecov/c/github/coderhaoxin/react.mdl.svg?style=flat-square
[codecov-url]: https://codecov.io/github/coderhaoxin/react.mdl?branch=master
[license-img]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square
[license-url]: http://opensource.org/licenses/MIT
[david-img]: https://img.shields.io/david/coderhaoxin/react.mdl.svg?style=flat-square
[david-url]: https://david-dm.org/coderhaoxin/react.mdl