Using values directly in styled-components.
Closed this issue · 2 comments
mhaagens commented
Any pointers on how to use this with styled components?
jbovenschen commented
You can use this as follows with styled-components.
import Animated from '...';
import styled from 'styled-components';
const Button = styled(Animated.div)`
`;
And than you can apply the style={}
tag to your component the same way you would do with the Animated.div
api normally.
browniefed commented
Sorry, I missed this. I answered it in person for someone else.
Yes just use style={}
as @jbovenschen has suggested.
StyledComponents extracts to CSS for the most part and does magically CSS injection. There is no way for Animated to do anything about this. We only can access data via style
and can't read the CSS for StyledComponents or external className="" stylesheet stuff