-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Hey, we have a following case.
We have an existing styled-components app which theme's has function for calculating spaces eg.
import styled from 'styled-components'
const Text = styled.div`
${({ theme }) => theme.getFluidSpacing('padding-left', 'equal', 0)}
`
What would be a replacement in next-yak?
I've tried following:
import {styled, css} from 'next-yak'
import { theme } from '@theme/main'
const spacing = css`${theme.getFluidSpacing('padding-left', 'equal', 0)}`
const Text = styled.div`
${spacing}
`
and it doesn't work. It shows the given css as classname, not as style.
<div class="index_Text__giUSk
padding-left: 4rem;
@media screen and (min-width: 20em) {
padding-left: calc(4rem + 0 * ((100vw - 176rem) / -144));;
}
@media screen and (min-width: 110em) {
padding-left: 4rem;
}
">Home Page</div>
How should it be done?
Metadata
Metadata
Assignees
Labels
No labels