HomeServicesOfAmerica / styled-material-components

Styled Components implementation of Material Design
Other
71 stars 51 forks source link

fix(Snackbar): interpolate animations #329

Closed brad-decker closed 6 years ago

brad-decker commented 6 years ago

You can no longer just plop a keyframe into a text string, you must interpolate it with css inside of interpolations.

ok:

const x = styled.div`animation: ${keyframe}`;

not ok:

const x = styled.div`animation: ${props => props.animation &&
keyframe}`;

ok:

const x = styled.div`animation: ${props => props.animation &&
css`${keyframe}`};

styled-components doesn't check what is returned from your interpolations and run further interpolations on them.

Summary of changes:

-

Behaviors that should be QA'd:

-

-- The following sections are optional. Delete any that do not apply. --

Known bugs that will be handled in a different PR:

-

Related functionality that will be handled in a different PR:

-

Github Issues closed by this PR:

merlinbot commented 6 years ago
Messages
:book: ### Modified Components * Snackbar ### PR Application * [styled-material-components-pr-329](https://styled-material-components-pr-329.now.sh)

Generated by :no_entry_sign: dangerJS