Skip to content

[Emotion] Export component styles #8710

@p-young

Description

@p-young

It would be nice to have access to the css styles used in the components so that if we want to use some other component, we can apply the styles.

The example I have is using react-textarea-autosize and wanting to style it like elastic ui.

I've been using an older version of elastic ui and still including the .css files, and can use the css classnames to get the same styling.

However, now that everything has migrated to emotion, I'm not sure there is a consistent way to do that.

Exporting the styles of each component from the elastic ui package would allow re-using the styles and be useful even just for any custom component that may need to be created.

Example to export from the package:

https://github.com/elastic/eui/blob/v98.0.0/packages/eui/src/components/form/text_area/text_area.styles.ts

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions