этот код:
import React from 'react';
import styled from 'styled-components/native';
const Button = styled.Button`
color: palevioletred;
`;
interface Props {}
interface State {}
export default class App extends React.Component<Props, State> {
render() {
return <Button> Test btn</Button>;
}
}
вызывает эту ошибку:
Никакая перегрузка не соответствует этому вызову. Перегрузка 1 из 2, '(реквизит: Pick & Частичное <...>, "testID" | ... еще 6 ... | "disabled"> & {...; } & {...; } & {...; }): ReactElement <...> ', выдает следующую ошибку. Введите '{children: string; } 'отсутствуют следующие свойства из типа' Pick & Частичное <...>, "testID" | ... еще 6 ... | "disabled"> ': onPress, title Overload 2 of 2,' (props: StyledComponentPropsWithAs ): ReactElement , строка | ... еще 1 ... | (new (props: any) => Component <...>)> ', выдает следующую ошибку. Введите '{children: string; } 'отсутствуют следующие свойства из типа' Pick & Частичное <...>, "testID" | ... еще 6 ...
Я УСТАНОВЛЕН @types/styled-components
почему это происходит?