Skip to content

Need support for styled-component interpolated values (e.g. css) #11

@jdconner

Description

@jdconner

Expected code:

import styled, { css } from 'styled-components';
import createTheme from 'styled-variants';
import { keyframes } from 'styled-components';

const spin = keyframes`
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
`;

const LoaderTheme = createTheme('Loader', {
    borderRadius: '50%',
    width: '2em',
    height: '2em',
    animation: css`${spin} 0.6s linear infinite`,
});

Error when trying to use the code above:
Screen Shot 2019-11-01 at 4 07 11 PM

Related: https://www.styled-components.com/docs/api#css

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions