How to use the @instructure/ui-utils/lib/react/passthroughProps.pickProps 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
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 }}
            type="range"
            role="slider"
            id={this.id}
            min={this.props.min}
            max={this.props.max}
            step={this.props.step}
            value={this.value}
            onChange={this.noopChange}
            aria-valuenow={this.value}
            aria-valuemin={this.props.min}</div>
github instructure / instructure-ui / packages / ui-core / src / components / DateInput / index.js View on Github external
render () {
    const ignoredProps = [
      'type',
      'messages',
      'defaultValue',
      'value'
    ]
    const textInputProps = pickProps(this.props, omitProps(TextInput.propTypes, {}, ignoredProps))
    const { onChange, onKeyDown, onClick, onBlur } = this.props // eslint-disable-line react/prop-types

    return (
      <span>
        
        </span>
github instructure / instructure-ui / packages / ui-layout / src / components / DrawerLayout / __tests__ / __testfixtures__ / DrawerLayoutTestApp.js View on Github external
render () {
    const {
      layoutWidth,
      trayWidth,
      trayPlacement
    } = this.props

    return (
      <div style="{{">
         { this._layout = node }}
        &gt;
           {
              return (
                <div style="{{">
                  Hello from tray
                </div>
              )
            }}
          /&gt;
          </div>
github instructure / instructure-ui / packages / ui-menu / src / components / Menu / MenuPopover / index.js View on Github external
onSelect={this.handleMenuSelect}
          onKeyDown={createChainedFunction(onKeyDown, this.handleMenuKeyDown)}
          onFlyoutDismiss={this.handleFlyoutDismiss}
          ref={el =&gt; {
            this._menu = el
            menuRef(el)
          }}
        &gt;
          {children}
        
      
    )

    return (
       {
          this._popover = el
          popoverRef(el)
        }}
      &gt;
        
          {safeCloneElement(this.props.trigger, {
            role: 'button',
            ref: el =&gt; { this._trigger = el },
            'aria-haspopup': true,
            id: this._labelId
          })}
github instructure / instructure-ui / packages / ui-core / src / components / Tray / index.js View on Github external
{
              this._content = el
              if (typeof contentRef === 'function') contentRef(el)
            }}
          &gt;
            <dialog role="region" open="{this.state.portalOpen">
              {this.renderCloseButton()}
              {children}
            </dialog>
github instructure / instructure-ui / packages / ui-core / src / components / Select / index.js View on Github external
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}">
          <select id="{this.id}"> {
              this._select = select
              selectRef.apply(this, [select].concat(args))
            }}
            value={value}
            defaultValue={defaultValue}
            onBlur={onBlur}
            onChange={this.handleChange}
            onKeyDown={this.handleKeyDown}</select></span>
github instructure / instructure-ui / packages / ui-core / src / components / PopoverMenu / index.js View on Github external
labelledBy={this.labelId}
          hidden={!this.show}
          ref={el =&gt; {
            this._menu = el
          }}
          onSelect={this.handleMenuSelect}
          onDismiss={this.handleMenuDismiss}
        &gt;
          {children}
        
      
    )

    return (
      
        
          {safeCloneElement(this.props.trigger, {
            role: 'button',
            tabIndex: 0,
            ref: c =&gt; {
              this._trigger = c
            },
            'aria-haspopup': true,
            id: this.labelId
github instructure / instructure-ui / packages / ui-toggle-details / src / components / ToggleGroup / elements / ToggleGroup.js View on Github external
render () {
    const Element = getElementType(ToggleGroup, this.props)

    return (
      
      {({ expanded, getToggleProps, getDetailsProps }) =&gt; {
        return (