mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
94.02k stars 32.3k forks source link

fix: sm >> small #44404

Closed teyter closed 6 days ago

teyter commented 1 week ago

Fixing this error:

No overload matches this call.
  Overload 1 of 2, '(props: { component: ElementType<any, keyof IntrinsicElements>; } & SvgIconOwnProps & CommonProps & Omit<any, "color" | ... 10 more ... | "titleAccess">): Element | null', gave the following error.
    Type '"sm"' is not assignable to type 'OverridableStringUnion<"small" | "inherit" | "medium" | "large", SvgIconPropsSizeOverrides> | undefined'.
  Overload 2 of 2, '(props: DefaultComponentProps<SvgIconTypeMap<{}, "svg">>): Element | null', gave the following error.
    Type '"sm"' is not assignable to type 'OverridableStringUnion<"small" | "inherit" | "medium" | "large", SvgIconPropsSizeOverrides> | undefined'.ts(2769)
SvgIcon.d.ts(44, 3): The expected type comes from property 'fontSize' which is declared here on type 'IntrinsicAttributes & { component: ElementType<any, keyof IntrinsicElements>; } & SvgIconOwnProps & CommonProps & Omit<...>'
SvgIcon.d.ts(44, 3): The expected type comes from property 'fontSize' which is declared here on type 'IntrinsicAttributes & SvgIconOwnProps & CommonProps & Omit<Omit<SVGProps<SVGSVGElement>, "ref"> & { ...; }, "color" | ... 10 more ... | "titleAccess">'
(property) SvgIconOwnProps.fontSize?: OverridableStringUnion<"small" | "inherit" | "medium" | "large", SvgIconPropsSizeOverrides> | undefined
The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.

@default

'medium'
mui-bot commented 1 week ago

Netlify deploy preview

https://deploy-preview-44404--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad) No bundle size changes

Generated by :no_entry_sign: dangerJS against 53cd756d90db70c44e7fc014ed5ece082db3e599

oliviertassinari commented 6 days ago

Closing per https://github.com/mui/material-ui/pull/44064#issuecomment-2408236000. Thanks for the effort though.