oblador / react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
https://oblador.github.io/react-native-vector-icons/
MIT License
17.31k stars 2.12k forks source link

Add MaterialIcons variants #1596

Open viniciusyoshioka opened 4 months ago

viniciusyoshioka commented 4 months ago

Hello!

This PR adds the variants outlined, round and sharp to MaterialIcon. Those variants can be used by passing its name as a prop to the icon component (as @johnf said in this comment), e.g.:

<MaterialIcon
    name={"icon-name"}
    size={24}
    color={"white"}
    round
/>

Observarions

On Google Fonts, there is the Two Tone style. I choosed to not add it because I didn't notice any difference between the the Two Tone and Regular styles.

The glyphmaps for MaterialIcons changed. Each variant can have icons that doesn't exists in other variants. And each variant can have one icon that points to a different codepoint while have the same name. Therefore, each style has its codepoints object.

If there are anything to change, please let me know.

brijeshc commented 3 months ago

This will be a much-needed and awaited addition. Material Icons have been updated for a while. It will be great if this PR is merged soon.