You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, in kibana we use a Charts plugin to share a theme across all Chart instances. This is done by using either an observable or a react hook to get the theme and baseTheme then pass them to the Settings Chart component.
This is very repetitive and often overlooked, to where only two of the 20 or so usages are using this theme service.
Describe the solution you'd like
I'd like a way to share a component across all usages that implements the theming logic, then people can simply import this new ThemedChart component and override any theme values they desire.
Some kind of HOC that passes a baseTheme and theme to the Settings component. The issue is that you cannot simply create a HOC with props on a nested Child component. This would require changes to allow this functionality.
Maybe an easier but less ideal approach could be to provide a ThemedSettings HO component in kibana that passes around the correct theming. This would not require any changes to EC. Something like...
constMyComponent=()=>(<Chart><ThemedSettingstheme={EuiThemeOverrides}{...otherSettingsProps}/>{/* more goodness */}</Chart>)
Checklist
this request is checked against already exist requests
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, in kibana we use a Charts plugin to share a theme across all Chart instances. This is done by using either an observable or a react hook to get the
theme
andbaseTheme
then pass them to the Settings Chart component.This is very repetitive and often overlooked, to where only two of the 20 or so usages are using this theme service.
Describe the solution you'd like
I'd like a way to share a component across all usages that implements the theming logic, then people can simply import this new
ThemedChart
component and override anytheme
values they desire.Some kind of HOC that passes a
baseTheme
andtheme
to theSettings
component. The issue is that you cannot simply create a HOC with props on a nested Child component. This would require changes to allow this functionality.Maybe an easier but less ideal approach could be to provide a
ThemedSettings
HO component in kibana that passes around the correct theming. This would not require any changes to EC. Something like...Checklist
The text was updated successfully, but these errors were encountered: