Skip to content

[BREAKING CHANGE] Support @emotion/styled #63

@philippefutureboy

Description

@philippefutureboy

Hello!

I love your little library, and I'd love to be able to leverage it in my ecosystem with @emotion.
My suggestion for the implementation would be to extract the styled component dependency from your library and offer an initialization hook of some sort that could take the styled library of choice as a parameter.

Something like this:

import styled from '@emotion/styled';
import { jsx, css } from '@emotion/core';
import { initialize } from 'styled-css-grid';

initialize({
  package: '@emotion/styled@^10',
  exports: {
    styled,
    jsx,
    css,
  }
});

And then in your code depending on the scope from the initialize function you could have a conditional that branches based on the API of the provided package.

How does that sound?

Have a great day!

Cheers,

Philippe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions