prop-types#node JavaScript Examples

The following examples show how to use prop-types#node. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SlideAnimation.js    From wix-style-react with MIT License 6 votes vote down vote up
SlideAnimation.propTypes = {
  isVisible: bool.isRequired,
  direction: oneOf([SlideDirection.in, SlideDirection.out]),
  animateAppear: bool,
  animateEnter: bool,
  animateLeave: bool,
  children: node,
  onEnter: func,
  onEntered: func,
  onExit: func,
  onExited: func,
};
Example #2
Source File: types.js    From react-native-neomorph-shadows with MIT License 6 votes vote down vote up
InnerShadowType = {
  ...ViewPropTypes,
  children: node,
  style: shape({
    ...ViewPropTypes.style,
    width: number.isRequired,
    height: number.isRequired,
  }),
}
Example #3
Source File: SubMenu.js    From react-menu with MIT License 6 votes vote down vote up
SubMenu.propTypes = {
  ...menuPropTypes,
  ...uncontrolledMenuPropTypes,
  disabled: bool,
  openTrigger: oneOf(['none', 'clickOnly']),
  label: oneOfType([node, func]),
  itemProps: shape({
    ...stylePropTypes()
  })
};
Example #4
Source File: MenuItem.js    From react-menu with MIT License 6 votes vote down vote up
MenuItem.propTypes = {
  ...stylePropTypes(),
  value: any,
  href: string,
  type: oneOf(['checkbox', 'radio']),
  checked: bool,
  disabled: bool,
  children: oneOfType([node, func]),
  onClick: func
};
Example #5
Source File: MenuItem.js    From react-menu with MIT License 6 votes vote down vote up
process.env.NODE_ENV !== "production" ? MenuItem.propTypes = /*#__PURE__*/_extends({}, /*#__PURE__*/stylePropTypes(), {
  value: any,
  href: string,
  type: /*#__PURE__*/oneOf(['checkbox', 'radio']),
  checked: bool,
  disabled: bool,
  children: /*#__PURE__*/oneOfType([node, func]),
  onClick: func
}) : void 0;
Example #6
Source File: process.js    From basic-redis-chat-demo-go with MIT License 6 votes vote down vote up
export function processChannelMessage(inputMessage) {
    if(inputMessage == null) {
        inputMessage = node(nodeIdInputMessage);
    }
    console.log('channelMessage', inputMessage)
    let process = new Promise((resolve, reject) => webSocketSend(DataChannelMessage(selectedRecipientUUID, inputMessage)));
    process.then(() => {});
    process.catch((err) => console.log(err));
    return false;
}
Example #7
Source File: Puppeteer.props.js    From webrix with Apache License 2.0 6 votes vote down vote up
propTypes = {
    puppeteer: {
        children: node,
        props: shape({}),
        namespace: string,
    },
    break: {
        children: node,
        props: arrayOf(string),
        namespace: string,
    },
}
Example #8
Source File: Scrollable.props.js    From webrix with Apache License 2.0 6 votes vote down vote up
propTypes = {
    style: shape({}),
    onScroll: func,
    onUpdate: func,
    scrollOnDOMChange: bool,
    children: node,
    element: node,
    cssVarsOnTracks: bool, // temporary workaround for Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1266517
}
Example #9
Source File: Poppable.props.js    From webrix with Apache License 2.0 6 votes vote down vote up
propTypes = {
    container: oneOfType([
        func,
        shape({current: oneOfType([instanceOf(Element), instanceOf(_window.constructor)])}),
    ]),
    reference: oneOfType([
        func,
        instanceOf(DOMRect),
        shape({current: instanceOf(Element)}),
    ]),
    placements: func,
    placement: shape({
        top: number,
        left: number,
    }),
    overflow: func,
    onPlacement: func,
    default: number,
    children: node,
}
Example #10
Source File: SingleComponentStacked.js    From wix-style-react with MIT License 6 votes vote down vote up
SingleComponentStacked.propTypes = {
  /** storybook name */
  name: oneOfType([string, object]),
  /** names of the used components */
  componentsNames: array,
  /** any node to render inside */
  children: node,
  /** size of the children column. Can be one of "singleComponentSizes" constant */
  size: number,
};
Example #11
Source File: VerticalTabs.js    From wix-style-react with MIT License 6 votes vote down vote up
VerticalTabs.propTypes = {
  /** Text Size (small, medium) */
  size: oneOf(['small', 'medium']),

  /** Current selected tab id */
  activeTabId: number,

  /** Callback function called on tab selection change with the following parameters<code>(id)</code> */
  onChange: func,

  /** Child nodes of this component must be of type <code><VerticalTabs.TabsGroup></code> or <code><VerticalTabs.Footer></code>*/
  children: arrayOf(node),

  /** Data attribute for testing purposes */
  dataHook: string,
};
Example #12
Source File: Card.js    From wix-style-react with MIT License 6 votes vote down vote up
Card.propTypes = {
  /** any node to render inside card */
  children: node,
  /** any node that controls card e.g. a close button */
  controls: node,
  /** makes the card stretch to max height in a container */
  stretchVertically: bool,
  /** makes the card's overflow content to be hidden */
  hideOverflow: bool,
  /** additional css classes */
  className: string,
  dataHook: string,
};
Example #13
Source File: FillPreview.js    From wix-style-react with MIT License 6 votes vote down vote up
FillPreview.propTypes = {
  /** render as some other component or DOM tag */
  as: oneOfType([func, object, string]),

  /** control focusability */
  tabIndex: number,

  /** Color, gradient, image url or svg to be rendered as a preview content */
  fill: oneOfType([string, node]),

  /** Outlines the border when set to true */
  selected: bool,

  /** Pass your handler for click event */
  onClick: func,

  /** Puts the component into a disabled state */
  disabled: bool,

  /** Control elements aspect ratio value:  */
  aspectRatio: oneOfType([string, number]),
};
Example #14
Source File: MultiSelectComposite.js    From wix-style-react with MIT License 6 votes vote down vote up
MultiSelectComposite.propTypes = {
  children: Composite.children(
    Composite.optional(Label),
    Composite.once(MultiSelect),
  ),
  required: bool,
  appendToParent: bool,
  info: node,
  tooltip: node,
};
Example #15
Source File: Shadow.jsx    From webrix with Apache License 2.0 5 votes vote down vote up
ScrollShadow.propTypes = {
    children: node,
};
Example #16
Source File: index.js    From juggernaut-desktop with MIT License 5 votes vote down vote up
ctaType = shape({
  type: oneOf(['button', 'icon']).isRequired,
  action: func.isRequired,
  label: string,
  icon: oneOfType([string, node]),
  tooltip: string
})
Example #17
Source File: InputAreaWithLabelComposite.js    From wix-style-react with MIT License 5 votes vote down vote up
InputAreaWithLabelComposite.propTypes = {
  children: any,
  required: bool,
  appendToParent: bool,
  info: node,
  tooltip: node,
};
Example #18
Source File: SubMenu.js    From react-menu with MIT License 5 votes vote down vote up
process.env.NODE_ENV !== "production" ? SubMenu.propTypes = /*#__PURE__*/_extends({}, menuPropTypes, uncontrolledMenuPropTypes, {
  disabled: bool,
  openTrigger: /*#__PURE__*/oneOf(['none', 'clickOnly']),
  label: /*#__PURE__*/oneOfType([node, func]),
  itemProps: /*#__PURE__*/shape( /*#__PURE__*/_extends({}, /*#__PURE__*/stylePropTypes()))
}) : void 0;
Example #19
Source File: Link.js    From wix-style-react with MIT License 5 votes vote down vote up
Link.propTypes = {
  children: node.isRequired,
  isActive: bool,
};
Example #20
Source File: OBSplashScreen.js    From discovery-mobile-ui with MIT License 5 votes vote down vote up
FadeInView.propTypes = {
  children: node.isRequired,
};
Example #21
Source File: OBSectionCoverTemplate.js    From discovery-mobile-ui with MIT License 5 votes vote down vote up
OBSectionCoverTemplate.propTypes = {
  title: string.isRequired,
  children: node.isRequired,
};
Example #22
Source File: OBSectionBodyTemplate.js    From discovery-mobile-ui with MIT License 5 votes vote down vote up
OBSectionBodyTemplate.propTypes = {
  title: string.isRequired,
  subTitle: string.isRequired,
  subTitle2: string,
  children: node.isRequired,
  showSuccess: bool,
};
Example #23
Source File: index.js    From discovery-mobile-ui with MIT License 5 votes vote down vote up
FilterDrawer.propTypes = {
  children: node.isRequired,
};
Example #24
Source File: StateProvider.js    From discovery-mobile-ui with MIT License 5 votes vote down vote up
StateProvider.propTypes = {
  children: node.isRequired,
};
Example #25
Source File: FieldLabelAttributes.js    From wix-style-react with MIT License 5 votes vote down vote up
FieldLabelAttributes.propTypes = {
  required: bool,
  info: node,
  appendToParent: bool,
  tooltip: node,
};
Example #26
Source File: ResizeObserver.jsx    From webrix with Apache License 2.0 5 votes vote down vote up
ResizeObserver.propTypes = {
    children: node,
    onResize: func,
};
Example #27
Source File: useClickOutside.js    From webrix with Apache License 2.0 5 votes vote down vote up
ClickOutsideOverride.propTypes = {
    condition: func,
    children: node,
};
Example #28
Source File: Stackable.props.js    From webrix with Apache License 2.0 5 votes vote down vote up
propTypes = {
    zIndex: number,
    target: instanceOf(Element),
    parent: shape({current: instanceOf(Element)}),
    children: node,
}
Example #29
Source File: TableToolbar.js    From wix-style-react with MIT License 5 votes vote down vote up
SelectedCount.propTypes = {
  children: node,
  dataHook: string,
};