Skip to content

Commit

Permalink
Incorporating review feedback from @kyleturco
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Habdas committed Nov 25, 2015
1 parent 2a5d081 commit 36956a6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Segment} from 'stardust';

export default class SegmentVerticalExample extends Component {
export default class SegmentVerticalSegmentExample extends Component {
render() {
return (
<Segment>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Segment, Segments} from 'stardust';

export default class SegmentCompactGroupsExample extends Component {
export default class SegmentCompactGroupExample extends Component {
render() {
return (
<Segments className='compact'>
Expand Down
4 changes: 2 additions & 2 deletions src/collections/Table/Table.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import _ from 'lodash';
import React, {Children, Component, PropTypes} from 'react';
import classNames from 'classnames';
import {childrenOfTypesOnly} from '../../utils/customPropTypes';
import {ofComponentTypes} from 'src/utils/customPropTypes';
import META from 'src/utils/Meta';

export default class Table extends Component {
static propTypes = {
basic: PropTypes.bool,
children: childrenOfTypesOnly(['TableColumn']),
children: ofComponentTypes(['TableColumn']),
className: PropTypes.string,
data: PropTypes.array,
};
Expand Down
4 changes: 2 additions & 2 deletions src/elements/Segment/Segments.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component, PropTypes} from 'react';
import classNames from 'classnames';
import META from 'src/utils/Meta';
import {childrenOfTypesOnly} from '../../utils/customPropTypes';
import {ofComponentTypes} from 'src/utils/customPropTypes';

/**
* A group of segments can be formatted to appear together.
Expand All @@ -11,7 +11,7 @@ export default class Segments extends Component {
/**
* Must be of type Segment, Segments, H1, H2, H3, H4, H5, H6, Subheading or Message.
*/
children: childrenOfTypesOnly(['Segment', 'Segments', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'Subheader', 'Message']),
children: ofComponentTypes(['Segment', 'Segments', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'Subheader', 'Message']),
/**
* Class name for custom styling.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/utils/customPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const customPropTypes = {
* @param {Array<string>} allowedTypes Collection of allowed Stardust component types
* @returns {Array} containing children of the specified type
*/
childrenOfTypesOnly: (allowedTypes) => {
ofComponentTypes: (allowedTypes) => {
return (props, propName, componentName) => {
const {children} = props;
const disallowed = Children.map(children, child => {
Expand Down
4 changes: 2 additions & 2 deletions src/views/Items/Item.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import _ from 'lodash';
import React, {Component, PropTypes} from 'react';
import classNames from 'classnames';
import customPropTypes from '../../utils/customPropTypes';
import {mutuallyExclusive} from 'src/utils/customPropTypes';
import META from 'src/utils/Meta';

export default class Item extends Component {
static propTypes = {
children: PropTypes.node,
className: PropTypes.string,
contentClass: PropTypes.string,
description: customPropTypes.mutuallyExclusive(['children']),
description: mutuallyExclusive(['children']),
extra: PropTypes.node,
header: PropTypes.node,
image: PropTypes.node,
Expand Down

0 comments on commit 36956a6

Please sign in to comment.