I have encountered a challenge while attempting to pass a mixin from Material UI to a styled-component. The problem lies in finding a way to transfer the mixin value to the styled-component without having to assign it to a css property. Unfortunately, directly passing the mixin like this does not work:
const Example = styled.div`
${p => p.theme.mixins.toolbar};
`;
Upon further investigation, I discovered that the issue was caused by the presence of a semi-colon adjacent to the closing '}'. It seems that including a semi colon leads the styled-component to interpret the mixin as a regular property instead.