How to use the @instructure/ui-utils/lib/react/passthroughProps.omitProps function in @instructure/ui-utils

To help you get started, we’ve selected a few @instructure/ui-utils 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 instructure / instructure-ui / packages / ui-core / src / components / RangeInput / index.js View on Github external
render () {
    const {
      formatValue,
      size
    } = this.props

    const props = omitProps(this.props, RangeInput.propTypes)

    const classes = {
      [styles.root]: true,
      [styles[size]]: size
    }

    /* eslint-disable jsx-a11y/no-redundant-roles */
    return (
      
        <div>
          <input> { this._input = c }}</div>
github instructure / instructure-ui / packages / ui-core / src / components / RadioInputGroup / index.js View on Github external
render () {
    const {
      variant,
      layout
    } = this.props

    return (
      
        {this.renderChildren()}
      
    )
  }
}
github instructure / instructure-ui / packages / ui-core / src / components / Select / index.js View on Github external
render () {
    const {
      size,
      children,
      width,
      layout,
      selectRef,
      onBlur,
      required,
      disabled,
      value,
      defaultValue
    } = this.props

    const props = omitProps(this.props, Select.propTypes)

    const classes = {
      [styles.root]: true,
      [styles[size]]: size,
      [styles.disabled]: disabled
    }

    const style = width ? { width } : null

    return (
      
        <span style="{style}"></span>
github instructure / instructure-ui / packages / ui-core / src / components / Autocomplete / index.js View on Github external
render () {
    const Component = this.props.multiple ? SelectMultiple : SelectSingle

    return (
      
    )
  }
}
github instructure / instructure-ui / packages / ui-core / src / components / FormField / FormFieldLabel / index.js View on Github external
render () {
    const ElementType = getElementType(FormFieldLabel, this.props)

    const classes = {
      [styles.root]: true,
      [styles['has-content']]: hasVisibleChildren(this.props.children)
    }

    return (
      
        {this.props.children}
      
    )
  }
}
github instructure / instructure-ui / packages / ui-forms / src / components / NumberInput / index.js View on Github external
layout,
      messages,
      onFocus,
      onKeyDown,
      placeholder,
      readOnly,
      required,
      showArrows,
      size,
      value,
      width
    } = this.props

    return (
github instructure / instructure-ui / packages / ui-core / src / components / List / ListItem / index.js View on Github external
render () {
    const props = omitProps(this.props, ListItem.propTypes, ['padding'])
    const delimiter = (this.props.variant === 'pipe') ? 'pipe' : this.props.delimiter
    const variant = (this.props.variant === 'pipe') ? 'inline' : this.props.variant
    const size = (this.props.variant === 'pipe') ? 'small' : this.props.size

    const noDelimiter = (delimiter === 'none' && variant !== 'inline')

    const noSpacing = this.props.delimiter !== 'none' || this.props.variant === 'pipe'
    warning(
      !(noSpacing && this.props.spacing),
      `[List] \`itemSpacing\` has no effect inside Lists with the \`delimiter\`
      prop set to anything other than \`none\`, or with a \`variant\` of \`pipe\``
    )

    const classes = {
      [styles.root]: true,
      [styles[variant]]: variant,
github instructure / instructure-ui / packages / ui-core / src / components / TextArea / index.js View on Github external
render () {
    const {
      placeholder,
      value,
      defaultValue,
      disabled,
      required,
      width,
      height,
      textareaRef,
      resize,
      size
    } = this.props

    const props = omitProps(this.props, TextArea.propTypes)

    const classes = {
      [styles.textarea]: true,
      [styles[size]]: true
    }

    const style = {
      width,
      resize,
      height
    }

    return (