akveo / react-native-ui-kitten

:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/react-native-ui-kitten/
MIT License
10.33k stars 954 forks source link

Text documentation is outdated #704

Closed dherault closed 5 years ago

dherault commented 5 years ago

Issue type

Issue description

Current behavior: For the Text component the documentation says:

TextComponentProps | TextComponentProps

So you would expect to have:

import { Text } from 'react-native-ui-kitten'

<Text TextComponentProps={{ numberOfLines: 1 }}>
    Foo
</Text>

Expected behavior: Whereas you have:

<Text numberOfLines={1}>
    Foo
</Text>

I think the second and current behavior is correct, and that you just need a way to update the documentation.

artyorsh commented 5 years ago

Hi 👋 I think it's a kinda misunderstanding. We mean you can pass any props that accept default text component exported from react-native. But I agree there is a typo: it should be TextProps

Thanks for reporting!

dherault commented 5 years ago

Maybe state ...TextProps | TextProps in the docs so the spread is intended.