diff --git a/types/react-native-elements/README.md b/types/react-native-elements/README.md new file mode 100644 index 0000000000..0ed43c6eb3 --- /dev/null +++ b/types/react-native-elements/README.md @@ -0,0 +1,27 @@ +# [React Native Elements](https://github.com/react-native-training/react-native-elements) + +### Component Checklist +List will update as typings are added + +- [x] Buttons +- [ ] Badge +- [ ] Social Icons / Social Icon Buttons +- [ ] Icons +- [ ] Side Menu +- [ ] Form Elements +- [ ] Search Bar +- [ ] ButtonGroup +- [ ] Checkboxes +- [ ] List Element +- [ ] Badge +- [ ] Tab Bar Component +- [x] HTML style headings +- [ ] Card component +- [ ] Pricing Component +- [ ] Grid Component +- [ ] Slider Component +- [ ] Tile Component +- [ ] Avatar Component +- [ ] Rating Component +- [ ] SwipeDeck Component +- [ ] Header Component diff --git a/types/react-native-elements/index.d.ts b/types/react-native-elements/index.d.ts index 8323ef1c25..5a39c78481 100644 --- a/types/react-native-elements/index.d.ts +++ b/types/react-native-elements/index.d.ts @@ -7,6 +7,45 @@ import * as React from 'react'; import { ViewStyle, TextStyle } from 'react-native'; +export interface TextProps { + /** + * font size 40 + */ + h1?: boolean; + + /** + * font size 34 + */ + h2?: boolean; + + /** + * font size 28 + */ + h3?: boolean; + + /** + * font size 22 + */ + h4?: boolean; + + /** + * font family name + */ + fontFamily?: string; + + /** + * Additional styling for Text + */ + style?: TextStyle; +} + +/** + * HTML Style Headings + * + * @desc https://react-native-training.github.io/react-native-elements/API/HTML_style_headings/ + */ +export class Text extends React.Component {} + export interface ButtonIcon { name?: string; color?: string; diff --git a/types/react-native-elements/react-native-elements-tests.tsx b/types/react-native-elements/react-native-elements-tests.tsx index 197b1ec202..836b04b431 100644 --- a/types/react-native-elements/react-native-elements-tests.tsx +++ b/types/react-native-elements/react-native-elements-tests.tsx @@ -1,6 +1,19 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; -import { Button } from 'react-native-elements'; +import { Button, Text } from 'react-native-elements'; + +class TextTest extends React.Component { + render() { + return ( + + Heading 1 + Heading 2 + Heading 3 + Heading 4 + + ); + } +} class ButtonTest extends React.Component { handleButtonPress() {