Better react imports for lists
parent
592024f42c
commit
95ea35fad8
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { PropTypes } from 'react';
|
||||
import { themr } from 'react-css-themr';
|
||||
import { LIST } from '../identifiers.js';
|
||||
|
||||
|
@ -7,10 +7,10 @@ const ListDivider = ({inset, theme}) => (
|
|||
);
|
||||
|
||||
ListDivider.propTypes = {
|
||||
inset: React.PropTypes.bool,
|
||||
theme: React.PropTypes.shape({
|
||||
divider: React.PropTypes.string.isRequired,
|
||||
inset: React.PropTypes.string.isRequired
|
||||
inset: PropTypes.bool,
|
||||
theme: PropTypes.shape({
|
||||
divider: PropTypes.string.isRequired,
|
||||
inset: PropTypes.string.isRequired
|
||||
})
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import { themr } from 'react-css-themr';
|
||||
import { LIST } from '../identifiers.js';
|
||||
import InjectListItemContent from './ListItemContent.js';
|
||||
|
@ -6,17 +6,17 @@ import InjectListItemLayout from './ListItemLayout.js';
|
|||
import rippleFactory from '../ripple/Ripple.js';
|
||||
|
||||
const factory = (ripple, ListItemLayout, ListItemContent) => {
|
||||
class ListItem extends React.Component {
|
||||
class ListItem extends Component {
|
||||
static propTypes = {
|
||||
children: React.PropTypes.any,
|
||||
className: React.PropTypes.string,
|
||||
disabled: React.PropTypes.bool,
|
||||
onClick: React.PropTypes.func,
|
||||
ripple: React.PropTypes.bool,
|
||||
theme: React.PropTypes.shape({
|
||||
listItem: React.PropTypes.string.isRequired
|
||||
children: PropTypes.any,
|
||||
className: PropTypes.string,
|
||||
disabled: PropTypes.bool,
|
||||
onClick: PropTypes.func,
|
||||
ripple: PropTypes.bool,
|
||||
theme: PropTypes.shape({
|
||||
listItem: PropTypes.string.isRequired
|
||||
}),
|
||||
to: React.PropTypes.string
|
||||
to: PropTypes.string
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { PropTypes } from 'react';
|
||||
import { themr } from 'react-css-themr';
|
||||
import { LIST } from '../identifiers.js';
|
||||
import InjectListItemAction from './ListItemAction.js';
|
||||
|
@ -17,12 +17,12 @@ const factory = (ListItemAction) => {
|
|||
};
|
||||
|
||||
ListItemActions.propTypes = {
|
||||
children: React.PropTypes.any,
|
||||
theme: React.PropTypes.shape({
|
||||
left: React.PropTypes.string.isRequired,
|
||||
right: React.PropTypes.string.isRequired
|
||||
children: PropTypes.any,
|
||||
theme: PropTypes.shape({
|
||||
left: PropTypes.string.isRequired,
|
||||
right: PropTypes.string.isRequired
|
||||
}),
|
||||
type: React.PropTypes.oneOf(['left', 'right'])
|
||||
type: PropTypes.oneOf(['left', 'right'])
|
||||
};
|
||||
|
||||
return ListItemActions;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { PropTypes } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import { themr } from 'react-css-themr';
|
||||
import { LIST } from '../identifiers.js';
|
||||
|
@ -36,33 +36,33 @@ const factory = (Avatar, ListItemContent, ListItemActions) => {
|
|||
};
|
||||
|
||||
ListItemLayout.propTypes = {
|
||||
avatar: React.PropTypes.oneOfType([
|
||||
React.PropTypes.string,
|
||||
React.PropTypes.element
|
||||
avatar: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.element
|
||||
]),
|
||||
caption: React.PropTypes.string,
|
||||
children: React.PropTypes.any,
|
||||
className: React.PropTypes.string,
|
||||
disabled: React.PropTypes.bool,
|
||||
itemContent: React.PropTypes.element,
|
||||
leftActions: React.PropTypes.array,
|
||||
leftIcon: React.PropTypes.oneOfType([
|
||||
React.PropTypes.string,
|
||||
React.PropTypes.element
|
||||
caption: PropTypes.string,
|
||||
children: PropTypes.any,
|
||||
className: PropTypes.string,
|
||||
disabled: PropTypes.bool,
|
||||
itemContent: PropTypes.element,
|
||||
leftActions: PropTypes.array,
|
||||
leftIcon: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.element
|
||||
]),
|
||||
legend: React.PropTypes.string,
|
||||
rightActions: React.PropTypes.array,
|
||||
rightIcon: React.PropTypes.oneOfType([
|
||||
React.PropTypes.string,
|
||||
React.PropTypes.element
|
||||
legend: PropTypes.string,
|
||||
rightActions: PropTypes.array,
|
||||
rightIcon: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.element
|
||||
]),
|
||||
selectable: React.PropTypes.bool,
|
||||
theme: React.PropTypes.shape({
|
||||
disabled: React.PropTypes.string.isRequired,
|
||||
item: React.PropTypes.string.isRequired,
|
||||
selectable: React.PropTypes.string.isRequired
|
||||
selectable: PropTypes.bool,
|
||||
theme: PropTypes.shape({
|
||||
disabled: PropTypes.string.isRequired,
|
||||
item: PropTypes.string.isRequired,
|
||||
selectable: PropTypes.string.isRequired
|
||||
}),
|
||||
to: React.PropTypes.string
|
||||
to: PropTypes.string
|
||||
};
|
||||
|
||||
ListItemLayout.defaultProps = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { PropTypes } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import { themr } from 'react-css-themr';
|
||||
import { LIST } from '../identifiers.js';
|
||||
|
@ -13,12 +13,12 @@ const ListItemText = ({className, primary, children, theme, ...other}) => {
|
|||
};
|
||||
|
||||
ListItemText.propTypes = {
|
||||
children: React.PropTypes.any,
|
||||
className: React.PropTypes.string,
|
||||
primary: React.PropTypes.bool,
|
||||
theme: React.PropTypes.shape({
|
||||
itemText: React.PropTypes.string.isRequired,
|
||||
primary: React.PropTypes.string.isRequired
|
||||
children: PropTypes.any,
|
||||
className: PropTypes.string,
|
||||
primary: PropTypes.bool,
|
||||
theme: PropTypes.shape({
|
||||
itemText: PropTypes.string.isRequired,
|
||||
primary: PropTypes.string.isRequired
|
||||
})
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { PropTypes } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import { themr } from 'react-css-themr';
|
||||
import { LIST } from '../identifiers.js';
|
||||
|
@ -8,9 +8,9 @@ const ListSubHeader = ({ caption, className, theme }) => (
|
|||
);
|
||||
|
||||
ListSubHeader.propTypes = {
|
||||
caption: React.PropTypes.string,
|
||||
className: React.PropTypes.string,
|
||||
theme: React.PropTypes.object
|
||||
caption: PropTypes.string,
|
||||
className: PropTypes.string,
|
||||
theme: PropTypes.object
|
||||
};
|
||||
|
||||
ListSubHeader.defaultProps = {
|
||||
|
|
Loading…
Reference in New Issue