alsoscotland / react-super-select

MIT License
95 stars 33 forks source link

Applying Material UI Theme - MUI #164

Closed marinsagovac closed 5 years ago

marinsagovac commented 5 years ago

I want to implement CSS from material UI theme, is there any demo, sample how to apply for multiselect with styles?

A code is worked in MUI, but styles diffs from your code to MUI. Is there any demos, recommendations, samples or working samples to applying MUI Theme.

Currently I got plain as:

selection_146

An image shows without styling.

A sample wrapped code trimmed:

      <MuiThemeProvider theme={theme}>
        <FormControl variant="outlined" fullWidth>
          <ReactSuperSelect
            placeholder="Make Your Selections"
            dataSource={testData}
            onChange={this.handlerExample}
            multiple
            searchable
            keepOpenOnSelection
          >
            {'label'}
          </ReactSuperSelect>
        </FormControl>
      </MuiThemeProvider>

Any samples, suggestions?

alsoscotland commented 5 years ago

@marinsagovac The package includes a default css stylesheet that you can add to your project here: https://github.com/alsoscotland/react-super-select/blob/master/lib/react-super-select.css

The component also supports a customClass attribute: http://alsoscotland.github.io/react-super-select/#customClass which is added to the outer-wrapping element of the control. I do not have material UI examples but hopefully that gives you enough info to go on to add your own styling