material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[Alert] Add `components` and `componentsProps` props to allow close action overrides

Open jake-collibra opened this issue 3 years ago • 6 comments
trafficstars

Closes #33230

jake-collibra avatar Jul 19 '22 21:07 jake-collibra

Messages
:book: Netlify deploy preview: https://deploy-preview-33582--material-ui.netlify.app/

Details of bundle changes

Generated by :no_entry_sign: dangerJS against b858412bc0aa125057fbd57427be75bf45d5cd29

mui-bot avatar Jul 19 '22 22:07 mui-bot

I think we should also add a warning that if components.CloseIcon is provided, the onClose should also be provided without which components.CloseIcon is of no use. Something like this.

I get a 406 on that link. I'll look into this, thanks.

jake-collibra avatar Jul 25 '22 16:07 jake-collibra

@ZeeshanTamboli in my use case I'm wanting to override the default close icon with my company's custom close icon via theme overrides. If I warned on providing CloseIcon with no onClose, users implementing our themed components would get warnings unless they provided onClose, which I don't think is what we want.

jake-collibra avatar Jul 25 '22 20:07 jake-collibra

@ZeeshanTamboli in my use case I'm wanting to override the default close icon with my company's custom close icon via theme overrides. If I warned on providing CloseIcon with no onClose, users implementing our themed components would get warnings unless they provided onClose, which I don't think is what we want.

Come to think of it, it would be not necessary to have a warning. If CloseIcon is provided, users would provide an onClose action. I think we can ignore it.

ZeeshanTamboli avatar Jul 26 '22 05:07 ZeeshanTamboli

@ZeeshanTamboli It's been three days, how long is reasonable to wait?

jake-collibra avatar Jul 28 '22 20:07 jake-collibra

@mnajdova I updated this on Friday to add your recommendations. I drew inspiration from Backdrop, since most other components that have components and componentsProps are unstyled components in @mui/base. Let me know if this is close to what you had in mind.

jake-collibra avatar Aug 01 '22 15:08 jake-collibra

@mnajdova @michaldudak It's been a little while - is there anything else that needs to be done with this PR before it gets merged?

jake-collibra avatar Sep 08 '22 14:09 jake-collibra

Could you please merge in the latest master? This should solve the failing regression tests issue.

michaldudak avatar Oct 18 '22 09:10 michaldudak