Skip to content

Instantly share code, notes, and snippets.

apps-manager

Block or report user

Report or block apps-manager

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View FormCol.js
import React from 'react';
import PropTypes from 'prop-types';
import {FlexCol} from 'pivotal-ui/react/flex-grids';
import {FormUnit} from 'pivotal-ui/react/forms';
import classnames from 'classnames';
export class FormCol extends React.Component {
static propTypes = {
state: PropTypes.object,
canSubmit: PropTypes.func,
View FormRow.js
import React from 'react';
import PropTypes from 'prop-types';
import {Grid} from 'pivotal-ui/react/flex-grids';
import classnames from 'classnames';
export class FormRow extends React.Component {
static propTypes = {
state: PropTypes.object,
children: PropTypes.node,
className: PropTypes.string,
View GridForm.js
import React from 'react';
import PropTypes from 'prop-types';
import {Form} from 'pivotal-ui/react/forms';
const hasName = col => col && col.props && col.props.name;
const getFields = children => React.Children.toArray(children).filter(Boolean).reduce((memo, {props: {children}}) => ({
...memo,
...React.Children.toArray(children).filter(hasName).reduce((memo, {props}) => ({...memo, [props.name]: props}), {})
}), {});
You can’t perform that action at this time.