У меня есть этот стилизованный компонент:
type Props = {
iconAlign: string,
};
const IconWrapper: ComponentType<Props> = styled.View`
margin: 10px 10px 0px 10px;
position: absolute;
${({ iconAlign }: Props) =>
iconAlign === 'left' ? 'left: -35px;' : 'right: -35px;'}
`;
И назовите это так:
<IconWrapper iconAlign="left">
но Flow выдает мне следующую ошибку:
Cannot call styled.View because property iconAlign is missing in object type [1] in the first argument of array element.
"flow-bin": "0.96.0",
"styled-components": "^4.2.0",
libdef: styled-components_v4.x.x (satisfies styled-components@4.2.0)