While Referencing another component in the styled Component I am getting this error
ReferenceError: Cannot access 'SiteHeader' before initialization
here is the code
//Common.ts
import styled from 'styled-components/macro';
import { SiteHeader } from '../Theme/Layout/Header';
export const Container = styled.div`
padding: 0 15px;
${SiteHeader} & {
padding-top: 20px;
padding-bottom: 20px;
}
`;
//header.tsx
import { Container } from '../../Styles/Common';
import styled from 'styled-components/macro';
export default function Header(): JSX.Element {
return (
<SiteHeader>
<Container>
{/*navigation*/}
</Container>
</SiteHeader>
);
}
export const SiteHeader = styled.header`
background: var(--green-kelp);
`;