fix(icon): fix default icon color inheritence #556
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the problem this PR addresses
This fixes an icon color bug. Icons with no
color
prop declared are not inheriting the parent color as desired, but inheriting the nearest parent definition of--color
, which typically happens on the nearest MTheme. This causes a bug on button loaders where instead of applying the button color, it applies the MTheme color instead.Describe the changes in this PR
This PR replaces
![Screenshot 2023-06-23 at 4 12 34 PM](https://private-user-images.githubusercontent.com/1486885/248396305-3224e233-0a19-4a4e-981d-c90439c865f8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0NjY4NjIsIm5iZiI6MTcyMTQ2NjU2MiwicGF0aCI6Ii8xNDg2ODg1LzI0ODM5NjMwNS0zMjI0ZTIzMy0wYTE5LTRhNGUtOTgxZC1jOTA0MzljODY1ZjgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjBUMDkwOTIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2QwMjk0YTUzNmFkNzdjOGY3NWI2ZWNlNTk1Njg1MmU1ZWY5ZGU2Yjc1ZWI3NTBiYjkxZDQ1NzU1YTdjY2YyYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.434OXZHIUXZVh3LVRK_v87xm5eL1u0dDOxA2eHq-QYE)
![Screenshot 2023-06-23 at 4 12 14 PM](https://private-user-images.githubusercontent.com/1486885/248396349-ed8807fa-9fe4-426a-978d-53bde6dbc86e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0NjY4NjIsIm5iZiI6MTcyMTQ2NjU2MiwicGF0aCI6Ii8xNDg2ODg1LzI0ODM5NjM0OS1lZDg4MDdmYS05ZmU0LTQyNmEtOTc4ZC01M2JkZTZkYmM4NmUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjBUMDkwOTIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDFmZDIzZDYyMWM1MGNkN2UwM2Y3NTlkNjk5NzY3NDY1ZjFmM2I5M2JjODgxYzU2YThiZmExYWViN2I4NzBmMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.kVi6m9gZH96R5lY-YNM2Wkov-9VUEX3700oCP9ZXRrU)
![Screenshot 2023-06-23 at 4 27 16 PM](https://private-user-images.githubusercontent.com/1486885/248396396-1f7c9bec-cad5-4905-b4d3-00eba123afa1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0NjY4NjIsIm5iZiI6MTcyMTQ2NjU2MiwicGF0aCI6Ii8xNDg2ODg1LzI0ODM5NjM5Ni0xZjdjOWJlYy1jYWQ1LTQ5MDUtYjRkMy0wMGViYTEyM2FmYTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjBUMDkwOTIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDE3YmIyY2Q5M2ZmYjU1YzE0ZGI4NjE1YTcwZGJmZjQ4YzlhYjVhZmYzNzRkZTdkYjJjNjRiMmJiMjM1OGNkMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.NG1gzng0JXZWQ6myC-uvmPYGTDQf_G3n63Jb6aLp-II)
--color: inherit
with--color: currentColor
, which fixes the color inheritance bug.Other information