How to add custom colors/attributes to the theme?
See original GitHub issuePreviously: #317, #568, #799, but I don’t think the question has been answered:
What is the recommended way to pass custom attributes (eg. custom accent colors besides the one accent
property) through the theme? The typescript type currently makes this inconvenient.
One way is to make a separate auxTheme
object and pass it through a custom context, but it would be nicer to be able to use a single theme object.
Perhaps adding a auxiliary: any
key to the theme type will be sufficient? Perhaps we can make Provider
take a generic type for the auxiliary object, or infer it?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to create a truly custom theme in Jetpack Compose
In the following sections, we will create our own theme in a very similar way, but it will contain: colors; typography; dimensions. Create...
Read more >Create or delete a custom theme color - Microsoft Support
On the Themes tab, under Theme Options, click Colors, and then click Create Theme Colors. · Click a color that you want to...
Read more >Creating Color Themes With Custom Properties, HSL, and a ...
Creating Color Themes With Custom Properties, HSL, and a Little calc() ... For example, here are variables defined on data attributes:.
Read more >Building a Material Theme on Android: Color
Let's take a look at how you can add your chosen color palette to your app theme by overriding relevant attributes.
Read more >Customizing Colors and Themes in Jetpack Compose ...
Update the Theme Colors of a Compose application. In this video, I add new colors to Colors.kt, then associate them with the Material...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Support has been merged (#2002) and it is now available on
react-native-paper@^4.0.0-alpha.2
, just tried it out and it works like a charm.Usage:
Is there any workaround with the ESLint rule over typescript-eslint/no-namespace?