viclafouch / mui-file-input

A file input designed for the React library MUI
https://viclafouch.github.io/mui-file-input/
MIT License
77 stars 17 forks source link

Add hideIcon option #34

Closed junah201 closed 9 months ago

junah201 commented 1 year ago

This PR adds an option called hideIcon. if you enable this option, AttachFileIcon will not be display

And I have also added a desecription of this option in docs

viclafouch commented 1 year ago

I think we could just ignore this PR and do this :

<MuiFileInput
        InputProps={{
          startAdornment: (
            <InputAdornment>
              <></>
            </InputAdornment>
          )
        }}
        multiple
        value={value}
        onChange={handleChange}
        label="test"
      />

With this, dev can customize the InputAdornment children as he desired

junah201 commented 1 year ago

@viclafouch I think using InputProps might be a perfect way to implement the hideIcon option I want But, in my opinion, following the same logic, there is no need for hideSizeText If the outcome is the same, I believe it's better to opt for a more convenient approach

viclafouch commented 1 year ago

Ok, got it, let me back from vacation next week and I check that !

But Thanks a lot @junah201 !

ekarcnevets commented 9 months ago

I would love the ability to customize the adornment with a different icon please!