0

I am using semantic-ui-react and along with styled-components. I am wrapping the Tab component with styled-components to customize its look. Here is that code

const CustomTab = styled(Tab)<{props: TabProps}>`
    flex: 1;
    display: flex;
    margin-top: 10px;
    flex-direction: column;
`;

As you can see I am trying to specify that the props for CustomTab will be the same props as the Tab component. I did this based on this answer.

The problem is that typescript still seems to think that Menu props does not exits on my CustomTab component.

Where am I going wrong?

Chaim Friedman
  • 6,124
  • 4
  • 33
  • 61

1 Answers1

2

Try const CustomTab = styled(Tab)<TabProps>

You basically defined your props as an object that looks like this: {props: {TabProps}}

h-des
  • 767
  • 5
  • 9