How to use the prop-types.PropTypes.bool function in prop-types

To help you get started, we’ve selected a few prop-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elastic / kibana / x-pack / legacy / plugins / ml / public / application / settings / calendars / edit / calendar_form / calendar_form.js View on Github external
canDeleteCalendar: PropTypes.bool.isRequired,
  description: PropTypes.string,
  groupIds: PropTypes.array.isRequired,
  isEdit: PropTypes.bool.isRequired,
  isNewCalendarIdValid: PropTypes.bool.isRequired,
  jobIds: PropTypes.array.isRequired,
  onCalendarIdChange: PropTypes.func.isRequired,
  onCreate: PropTypes.func.isRequired,
  onCreateGroupOption: PropTypes.func.isRequired,
  onDescriptionChange: PropTypes.func.isRequired,
  onEdit: PropTypes.func.isRequired,
  onEventDelete: PropTypes.func.isRequired,
  onGroupSelection: PropTypes.func.isRequired,
  showImportModal: PropTypes.func.isRequired,
  onJobSelection: PropTypes.func.isRequired,
  saving: PropTypes.bool.isRequired,
  selectedGroupOptions: PropTypes.array.isRequired,
  selectedJobOptions: PropTypes.array.isRequired,
  showNewEventModal: PropTypes.func.isRequired,
};
github OasisDEX / oasis-react / src / components / OasisMarketWidget.js View on Github external
this.props.activeTradingPair
          )}
          collapseEnabled={true}
          collapseInitial={true}
        />
      
    );
  }
}

OasisMarketWidget.displayName = "OasisMarketWidget";
OasisMarketWidget.propTypes = PropTypes && {
  tradedTokens: PropTypes.object.isRequired,
  marketData: ImmutablePropTypes.list,
  loadingTradeHistory: PropTypes.bool,
  initialMarketHistoryLoaded: PropTypes.bool
};
export default CSSModules(OasisMarketWidget, styles, { allowMultiple: true });
github dimorinny / ethereum-erc20-wallet / src / containers / send / send.js View on Github external
const FORM_NAME = 'send';

const renderCommonField = renderField('send_input_container');
const renderShortField = renderField('send_input_container_short');

@connect(mapStateToProps, mapDispatchToProps)
@reduxForm({
    form: FORM_NAME,
    destroyOnUnmount: false
})
export default class Send extends Component {

    static propTypes = {
        send: PropTypes.shape({
            isPending: PropTypes.bool.isRequired,
            transaction: PropTypes.string,
            error: PropTypes.string
        }),
        account: PropTypes.shape({
            address: PropTypes.string.isRequired,
            contractAddress: PropTypes.string.isRequired,
            balance: PropTypes.number.isRequired,
            decimals: PropTypes.number.isRequired,
            symbol: PropTypes.string,
            totalSupply: PropTypes.number,
        }),
        changeFieldValue: PropTypes.func.isRequired,
        address: PropTypes.string,
        value: PropTypes.number,
    };
github OasisDEX / oasis-react / src / components / OasisMyOrders.jsx View on Github external
)
  }
];

const propTypes = {
  trades: ImmutablePropTypes.list,
  onFetchAndSubscribeUserTradesHistory: PropTypes.func.isRequired,
  activeNetworkName: PropTypes.string,
  removeOrderCancelledByTheOwner: PropTypes.func,
  initialMarketHistoryLoaded: PropTypes.bool,
  loadingUserMarketHistory: PropTypes.bool,
  activeTradingPairOffersInitiallyLoaded: PropTypes.bool,
  activeTradingPair: PropTypes.object,
  sellOffers: PropTypes.object,
  buyOffers: PropTypes.object,
  cancelOffer: PropTypes.func,
  defaultAccount: PropTypes.string
};
const defaultProps = {};

const VIEW_TYPE_OPEN_OFFERS = "Open";
const VIEW_TYPE_MARKET_HISTORY = "Closed";

class OasisMyOrders extends PureComponent {
  openOrdersColsDefinition(baseToken, quoteToken, orderActions) {
    return [
      { heading: "action", key: "tradeTypeEl" },
github benfluleck / HelloBooks / client / src / app / components / hoc / UserRoutes.jsx View on Github external
{...rest}
      render={props => (isAuthenticated && tokenExists ?
         :
        
      )
      }
    />
  );
};
UserRoutes.propTypes = {
  isAuthenticated: PropTypes.bool.isRequired,
  component: PropTypes.func.isRequired,
  tokenExists: PropTypes.bool.isRequired,
  location: PropTypes.object
};

const mapStateToProps = state => ({
  isAuthenticated: !!state.userReducer.isAuthenticated,
  tokenExists: !!localStorage.getItem('token') || false,
});

export default connect(mapStateToProps)(UserRoutes);
github elastic / kibana / x-pack / legacy / plugins / ml / public / settings / filter_lists / list / filter_lists.js View on Github external
import { injectI18n } from '@kbn/i18n/react';

import { toastNotifications } from 'ui/notify';

import { NavigationMenu } from '../../../components/navigation_menu/navigation_menu';

import { FilterListsHeader } from './header';
import { FilterListsTable } from './table';
import { ml } from '../../../services/ml_api_service';


export const FilterLists = injectI18n(class extends Component {
  static displayName = 'FilterLists';
  static propTypes = {
    canCreateFilter: PropTypes.bool.isRequired,
    canDeleteFilter: PropTypes.bool.isRequired
  };

  constructor(props) {
    super(props);

    this.state = {
      filterLists: [],
      selectedFilterLists: []
    };
  }

  componentDidMount() {
    this.refreshFilterLists();
  }
github linode / manager / components / tables / cells / LabelCell.js View on Github external
className={`LabelCell ${className} ${tooltipEnabledClass}`}
      column={column}
      record={record}
    >
      <span>{children}</span>
      {tooltipComponent}
    
  );
}

LabelCell.propTypes = {
  cellIndex: PropTypes.number,
  children: PropTypes.node,
  className: PropTypes.string,
  column: PropTypes.shape({
    disableTooltip: PropTypes.bool,
  }),
  record: PropTypes.object.isRequired,
};
github elamperti / OpenWebScrobbler / src / components / ScrobbleList.js View on Github external
{props.totalPages &gt; 1 &amp;&amp; (
          
        )}
      
    );
  } else {
    return props.children;
  }
}

ScrobbleList.propTypes = {
  analyticsEventForScrobbles: PropTypes.string,
  children: PropTypes.node.isRequired,
  cloneScrobblesTo: PropTypes.func,
  compact: PropTypes.bool,
  isAlbum: PropTypes.bool,
  loading: PropTypes.bool,
  noMenu: PropTypes.bool,
  onSelect: PropTypes.func,
  selected: PropTypes.array,
  scrobbles: PropTypes.array,
  userToDisplay: PropTypes.string,
  fetchLastfmProfileHistory: PropTypes.func,
  user: PropTypes.object
};

ScrobbleList.defaultProps = {
  compact: false,
  isAlbum: false,
  loading: false,
  noMenu: false,
github entando / entando-components / plugins / entando-plugin-dashboard / app-builder / src / ui / plugin-status / components / PluginStatus.js View on Github external
{ this.renderPublicAssetsTest() }
        { this.renderImportedAssetsTest() }
        { this.renderCssTest() }
        { this.renderTranslationTest() }
      
    );
  }
}

PluginStatus.defaultProps = {
  reduxOk: false,
  publicAssetFileName: '',
};

PluginStatus.propTypes = {
  reduxOk: PropTypes.bool,
  publicAssetFileName: PropTypes.string,
};

export default PluginStatus;
github dondido / webrtc-video-room / src / components / Communication.js View on Github external
<button data-ref="reject">Reject</button>
      <button data-ref="accept">Accept</button>
    
    <div>
      <p>Please, try another room!</p>
      OK
    </div>
    <div>
      <p><span>Waiting for someone to join this room:&nbsp;</span><a href="{window.location.href}">{window.location.href}</a><br>
      <span>The remote side hung up.</span></p>
    </div>
  

Communication.propTypes = {
  message: PropTypes.string.isRequired,
  audio: PropTypes.bool.isRequired,
  video: PropTypes.bool.isRequired,
  toggleVideo: PropTypes.func.isRequired,
  toggleAudio: PropTypes.func.isRequired,
  getContent: PropTypes.func.isRequired,
  send: PropTypes.func.isRequired,
  handleHangup: PropTypes.func.isRequired,
  handleInput: PropTypes.func.isRequired,
  handleInvitation: PropTypes.func.isRequired
};

export default Communication;