I am trying to create tokens with emotion but it is not working, I believe because of the typescript, because in javascript files it works. Does anyone know how to solve?
My theme:
import '@emotion/react';
export const palette = {
common: {
black: '000',
white: 'fff'
}
my component:
import styled from '@emotion/styled';
import { theme } from '../../utils/theme';
export const button = styled.button`
background: ${({ theme }) => theme.pallete.common.black};
`;
error:
Property 'pallete' does not exist on type 'object'
const palettebut you are importingthemeand then doing nothing withtheme.