Skip to content

Commit 36956a6

Browse files
author
Josh Habdas
committed
Incorporating review feedback from @kyleturco
1 parent 2a5d081 commit 36956a6

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

docs/app/Examples/elements/Segment/Types/SegmentVerticalSegmentExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, {Component} from 'react';
22
import {Segment} from 'stardust';
33

4-
export default class SegmentVerticalExample extends Component {
4+
export default class SegmentVerticalSegmentExample extends Component {
55
render() {
66
return (
77
<Segment>

docs/app/Examples/elements/Segment/Variations/SegmentCompactGroupExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, {Component} from 'react';
22
import {Segment, Segments} from 'stardust';
33

4-
export default class SegmentCompactGroupsExample extends Component {
4+
export default class SegmentCompactGroupExample extends Component {
55
render() {
66
return (
77
<Segments className='compact'>

src/collections/Table/Table.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import _ from 'lodash';
22
import React, {Children, Component, PropTypes} from 'react';
33
import classNames from 'classnames';
4-
import {childrenOfTypesOnly} from '../../utils/customPropTypes';
4+
import {ofComponentTypes} from 'src/utils/customPropTypes';
55
import META from 'src/utils/Meta';
66

77
export default class Table extends Component {
88
static propTypes = {
99
basic: PropTypes.bool,
10-
children: childrenOfTypesOnly(['TableColumn']),
10+
children: ofComponentTypes(['TableColumn']),
1111
className: PropTypes.string,
1212
data: PropTypes.array,
1313
};

src/elements/Segment/Segments.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, {Component, PropTypes} from 'react';
22
import classNames from 'classnames';
33
import META from 'src/utils/Meta';
4-
import {childrenOfTypesOnly} from '../../utils/customPropTypes';
4+
import {ofComponentTypes} from 'src/utils/customPropTypes';
55

66
/**
77
* A group of segments can be formatted to appear together.
@@ -11,7 +11,7 @@ export default class Segments extends Component {
1111
/**
1212
* Must be of type Segment, Segments, H1, H2, H3, H4, H5, H6, Subheading or Message.
1313
*/
14-
children: childrenOfTypesOnly(['Segment', 'Segments', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'Subheader', 'Message']),
14+
children: ofComponentTypes(['Segment', 'Segments', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'Subheader', 'Message']),
1515
/**
1616
* Class name for custom styling.
1717
*/

src/utils/customPropTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const customPropTypes = {
88
* @param {Array<string>} allowedTypes Collection of allowed Stardust component types
99
* @returns {Array} containing children of the specified type
1010
*/
11-
childrenOfTypesOnly: (allowedTypes) => {
11+
ofComponentTypes: (allowedTypes) => {
1212
return (props, propName, componentName) => {
1313
const {children} = props;
1414
const disallowed = Children.map(children, child => {

src/views/Items/Item.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import _ from 'lodash';
22
import React, {Component, PropTypes} from 'react';
33
import classNames from 'classnames';
4-
import customPropTypes from '../../utils/customPropTypes';
4+
import {mutuallyExclusive} from 'src/utils/customPropTypes';
55
import META from 'src/utils/Meta';
66

77
export default class Item extends Component {
88
static propTypes = {
99
children: PropTypes.node,
1010
className: PropTypes.string,
1111
contentClass: PropTypes.string,
12-
description: customPropTypes.mutuallyExclusive(['children']),
12+
description: mutuallyExclusive(['children']),
1313
extra: PropTypes.node,
1414
header: PropTypes.node,
1515
image: PropTypes.node,

0 commit comments

Comments
 (0)