Skip to content

[EuiProvider] Provide data about parent and default theme configurations #6210

@thompsongl

Description

@thompsongl

Related: https://github.com/elastic/kibana-team/issues/805

EuiProvider ships with a default theme value for convenience, but the implicit fallback can cause problems when a component renders outside of the context tree. Missing a themeMode toggle is the most common, resulting in light/dark inconsistencies.

Similarly, inverting the colorMode does not always indicate a desire for the entire subcomponent tree to inherit. For instance, a design decision for all popovers to be light mode regardless of context.

Both can be addressed by adding more data about top-level EuiProvider use and configuration. That data can then be used to enforce usage by warn logging or throwing exceptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    emotionstale-issue(Don't delete - used for automation)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions