Styled components -> how to access other styled component or yourself!
& + ${() => Foo}
usage:
const Button = styled('button')`
& + ${() => Button} {
margin-left: 10px;
}
`;
If you are using a newer version of styled components I believe & + &
should work now though.
${Foo} + &
usage:
const Box = styled('div')``;
const Button = styled('button')`
${Box} + & {
margin-top: 10px;
}
`;