From c4c450dc7929c5395e685b6b525deafb6737f415 Mon Sep 17 00:00:00 2001 From: mrmeku Date: Mon, 5 Jun 2017 13:47:58 -0600 Subject: [PATCH 1/2] Documentation for the inputs of the box component --- src/components/box/box.jsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/components/box/box.jsx b/src/components/box/box.jsx index cabafd501..c7dbb8b54 100644 --- a/src/components/box/box.jsx +++ b/src/components/box/box.jsx @@ -75,40 +75,59 @@ const Box = props => { }, children); }; Box.propTypes = { + /** Defines how the browser distributes space between and around content items vertically within this box. */ alignContent: PropTypes.oneOf([ 'flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'stretch' ]), + /** Defines how the browser distributes space between and around flex items horizontally within this box. */ alignItems: PropTypes.oneOf([ 'flex-start', 'flex-end', 'center', 'baseline', 'stretch' ]), + /** Specifies how this box should be aligned inside of its container (requires the container to be flexable). */ alignSelf: PropTypes.oneOf([ 'auto', 'flex-start', 'flex-end', 'center', 'baseline', 'stretch' ]), + /** Specifies the initial length of this box */ basis: PropTypes.oneOfType([ PropTypes.number, PropTypes.oneOf(['auto']) ]), + /** Specifies the the HTML nodes which will be child elements of this box. */ children: PropTypes.node, + /** Specifies the class name that will be set on this box */ className: PropTypes.string, + /** + * A callback function whose first parameter is the underlying dom elements. + * This call back will be executed immediately after the component is mounted or unmounted + */ componentRef: PropTypes.func, + /** https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction */ direction: PropTypes.oneOf([ 'row', 'row-reverse', 'column', 'column-reverse' ]), + /** Specifies the type of HTML element of this box. Defaults to div. */ element: PropTypes.string, + /** Specifies the flex grow factor of a flex item. */ grow: PropTypes.number, + /** The height in pixels (if specified as a number) or a string if different units are required. */ height: PropTypes.oneOfType([ PropTypes.number, PropTypes.string ]), + /** https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content */ justifyContent: PropTypes.oneOf([ 'flex-start', 'flex-end', 'center', 'space-between', 'space-around' ]), + /** Specifies the flex shrink factor of a flex item. */ shrink: PropTypes.number, + /** An object whose keys are css property names and whose values correspond the the css property. */ style: stylePropType, + /** The width in pixels (if specified as a number) or a string if different units are required. */ width: PropTypes.oneOfType([ PropTypes.number, PropTypes.string ]), + /** How whitespace should wrap within this block. */ wrap: PropTypes.oneOf([ 'nowrap', 'wrap', 'wrap-reverse' ]) From a29603ea40e39bb5bfadbafc55ea60c3caf73f94 Mon Sep 17 00:00:00 2001 From: Andrew Sliwinski Date: Mon, 10 Jul 2017 08:58:30 -0400 Subject: [PATCH 2/2] Remove trailing spaces --- src/components/box/box.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/box/box.jsx b/src/components/box/box.jsx index c7dbb8b54..d11497838 100644 --- a/src/components/box/box.jsx +++ b/src/components/box/box.jsx @@ -96,9 +96,9 @@ Box.propTypes = { children: PropTypes.node, /** Specifies the class name that will be set on this box */ className: PropTypes.string, - /** - * A callback function whose first parameter is the underlying dom elements. - * This call back will be executed immediately after the component is mounted or unmounted + /** + * A callback function whose first parameter is the underlying dom elements. + * This call back will be executed immediately after the component is mounted or unmounted */ componentRef: PropTypes.func, /** https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction */