4.1.1 • Published 5 months ago

checkable-material-ui v4.1.1

Weekly downloads
1,215
License
MIT
Repository
github
Last release
5 months ago

checkable-material-ui Weekly downloads

A material-ui component which looks like a TEXTFIELD grouping together a checkbox and a provided component


Demo

You can access the storybook for this component here.

Props

The component accepts the props defined bellow in the table.

Props accepted by CheckableMaterialUi

NameTypeRequiredDefaultDescription
idstringnoundefinedThe id of the field
checkedbooleannofalseIf true, the checkbox is selected
childrenanyyes-The component displayed on the right of the checkbox
helperTextstringnoundefinedThe helper text of the field
labelstringnoundefinedThe label of the field
onChange(checked: boolean) => voidyes-The callback function called when the checkbox value is changed
styleCSSPropertiesnoundefinedThe style applied to the field

Versions

CheckableMaterialUi usesMaterial-uiReact
1.0.x3.2.016.5.2
1.1.x3.6.016.6.3
1.2.x3.9.216.8.1
1.3.x3.9.316.8.6
2.0.x4.0.216.8.6
2.1.x4.2.016.8.6
2.2.x4.3.216.9.0
2.3.x4.6.116.9.0
2.4.x4.9.016.9.0
2.5.x4.10.216.9.0
2.6.x4.11.016.9.0
2.7.x4.11.316.9.0 or 17.0.0
2.8.x4.12.316.9.0 or 17.0.0
3.0.x5.5.1>= 17.0.0
4.0.x5.10.17>= 18.0.0

About versioning schema used for CheckableMaterialUi

  • Major - it will be increased if the major version of the dependat package changes or there are breaking changes in the code of CheckableMaterialUi
  • Minor - it will be increased if no major version of the dependat package changes, but there are changes of the minor or patch versions of it
  • Patch - it will be increased if there are no changes of the dependat packages, but there are non breaking changes in the code of CheckableMaterialUi

Example

The base component which allows to create read-only or creatable select components for selecting only one or more values:

import * as React from 'react';
import CheckableMaterialUi from 'checkable-material-ui';
import { ColorsSelect } from 'react-select-material-ui';

class App extends React.Component {
  render() {
    return (
      <div className="App">
        <CheckableMaterialUi
          helperText="The checkbox must be selected if a color is required"
          label="Colors"
          onChange={this.handleRequireColors}
        >
          <ColorsSelect
            label=""
            options={['red', 'green', 'blue']}
            onChange={this.handleChangeColors}
          />
        </CheckableMaterialUi>
      </div>
    );
  }

  handleRequireColors = (checked: boolean) => {
    console.log(checked);
  };

  handleChangeColors = (colors: string[]) => {
    console.log(colors);
  };
}

export default App;

Changelog

1.0.0

  • checkable-material-ui is made publicly available

1.1.1

  • Updated react and material-ui

1.2.0

  • Updated packages

1.3.0

  • Updated packages

2.0.0

  • Updated packages

2.1.0

  • Updated packages

2.1.1

  • Add a story book for this component
  • Updated packages

2.2.0

  • Removed lodash
  • Updated packages

2.3.0

  • Updated packages

2.4.0

  • Updated packages

2.4.1

  • Updated packages
  • Moved from npm to yarn

2.5.0

  • Updated packages

2.6.0

  • Updated packages

2.6.1

  • Fixed crash produced by "export * from"

2.7.0

  • Accepting React 17 as peerDependencies

2.7.1

  • Fixed security warnings

2.8.0

  • Updated packages

3.0.0

  • Migrated to material-ui 5
  • Supports minimum React 17

4.0.0

  • Supports minimum React 18
  • Updated packages

4.0.1

  • Fixed the typedef of the component
4.1.1

5 months ago

4.0.1

1 year ago

4.0.0

1 year ago

3.0.0

2 years ago

2.8.0

3 years ago

2.7.0

3 years ago

2.7.1

3 years ago

2.6.1

4 years ago

2.6.0

4 years ago

2.5.0

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.2.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

6 years ago