typescript error Property 'div' does not exist on type 'typeof DefaultTheme'

Viewed 1134

I am now first using typescript and started toy-project.

But by beginning, it's exhausted.

Below is my code:

import styled, { css } from 'styled-components';

export const Card = styled.div`
  ${({ theme }) => css`
    background-color: ${theme.colors.white};
    border-radius: 15px;
    display: flex;
    flex: 1;
    flex-direction: column;
    max-height: fit-content;
    padding: 13px;
  `}
`;

But error message is shown as:

enter image description here

How to change code??

Please help.

0 Answers
Related