DigitalRiver / react-atlas

Composable React components with CSS Modules.
http://digitalriver.github.io/react-atlas/
MIT License
38 stars 25 forks source link

Replace declare and eslint disable props to avoid passing them in prop spreads. #823

Closed hbowden closed 6 years ago

hbowden commented 6 years ago

Replace code that does the idiom/workaround below with the blacklist npm package: https://www.npmjs.com/package/blacklist

CheckBox, Dialog, Dropdown, Option, Radio, Switch, TextField all need the switch to using blacklist.


      className,
      disabled,
      groupError,
      hidden,
      id,
      inline,
      label,
      labelPosition,
      required,
      status,
      style,
      title,
      /*eslint-disable */
      // Declaring the following variables so they don't get passed to the input through the prop spread.
      onBeforeChange,
      valid,
      /*eslint-enable */
      ...others
    } = this.props;```