diff --git a/src/index.d.ts b/src/index.d.ts index 7b74f6859a..f9283257d2 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -93,7 +93,6 @@ export interface TextProps extends TextProperties { /** * HTML Style Headings * - * @see https://react-native-training.github.io/react-native-elements/API/HTML_style_headings/ */ export class Text extends React.Component {} @@ -207,7 +206,6 @@ export interface AvatarProps { /** * Avatar Component * - * @see https://react-native-training.github.io/react-native-elements/API/avatar/ */ export class Avatar extends React.Component {} @@ -329,7 +327,6 @@ export interface ButtonProps extends TouchableWithoutFeedbackProps { /** * Button component * - * @see https://react-native-training.github.io/react-native-elements/API/buttons/ */ export class Button extends React.Component {} @@ -359,7 +356,7 @@ export interface BadgeProps { /** * Override the default badge contents, mutually exclusive with 'value' property */ - children?: JSX.Element; + children?: React.ReactElement<{}>; /** * Custom component to replace the badge outer component @@ -377,7 +374,6 @@ export interface BadgeProps { /** * Badge component * - * @see https://react-native-training.github.io/react-native-elements/API/badge/ */ export class Badge extends React.Component {} @@ -402,7 +398,7 @@ export interface CardProps { /** * Card title */ - title?: string | JSX.Element; + title?: string | React.ReactElement<{}>; /** * Additional title styling (if title provided) @@ -468,7 +464,6 @@ export interface CardProps { /** * Card component * - * @see https://react-native-training.github.io/react-native-elements/API/card/ */ export class Card extends React.Component {} @@ -476,7 +471,7 @@ export class Card extends React.Component {} * Set the buttons within a Group. */ export interface ElementObject { - element: JSX.Element | React.ReactType; + element: React.ReactElement<{}> | React.ReactType; } /** @@ -647,7 +642,7 @@ export interface CheckBoxProps { /** * Title of checkbox */ - title?: string | JSX.Element; + title?: string | React.ReactElement<{}>; /** * Style of main container @@ -762,7 +757,7 @@ export interface InputProps extends TextInputProperties { /** * Displays an icon to the left (optional) */ - leftIcon?: JSX.Element; + leftIcon?: React.ReactElement<{}>; /** * Styling for left Icon Component container @@ -772,7 +767,7 @@ export interface InputProps extends TextInputProperties { /** * Displays an icon to the right (optional) */ - rightIcon?: JSX.Element; + rightIcon?: React.ReactElement<{}>; /** * Styling for the right icon container @@ -926,7 +921,7 @@ export interface HeaderIcon extends IconObject { /** * Defines the types that can be used in a header sub component */ -export type HeaderSubComponent = JSX.Element | TextProps | HeaderIcon; +export type HeaderSubComponent = React.ReactElement<{}> | TextProps | HeaderIcon; export interface HeaderProps extends ViewProperties { /** @@ -979,7 +974,6 @@ export interface HeaderProps extends ViewProperties { /** * Header component - * @see https://react-native-training.github.io/react-native-elements/API/header/ */ export class Header extends React.Component {} @@ -1062,7 +1056,6 @@ export interface IconProps { /** * Icon component - * @see https://react-native-training.github.io/react-native-elements/API/icons/ */ export class Icon extends React.Component {} @@ -1076,7 +1069,6 @@ export interface ListProps extends ViewProperties { /** * List component - * @see https://react-native-training.github.io/react-native-elements/API/lists/ */ export class List extends React.Component {} @@ -1084,7 +1076,7 @@ export interface ListItemProps { /** * Left avatar. This is the React Native Image source prop. Avatar can be used in parallel to leftIcon if needed. */ - avatar?: string | ImageURISource | JSX.Element; + avatar?: string | ImageURISource | React.ReactElement<{}>; /** * Avatar styling. This is the React Native Image style prop @@ -1166,7 +1158,7 @@ export interface ListItemProps { /** * Main title for list item, can be text or custom view */ - title?: string | JSX.Element; + title?: string | React.ReactElement<{}>; /** * Number of lines for title @@ -1188,7 +1180,7 @@ export interface ListItemProps { /** * Subtitle text or custom view */ - subtitle?: string | JSX.Element; + subtitle?: string | React.ReactElement<{}>; /** * Number of lines for Subtitle @@ -1236,7 +1228,7 @@ export interface ListItemProps { /** * Add a label with your own styling by providing a label={} prop to ListItem */ - label?: JSX.Element; + label?: React.ReactElement<{}>; /** * Icon configuration for left icon, either a name from the icon library (like material) or a React Native element like Image. @@ -1244,7 +1236,7 @@ export interface ListItemProps { * {name, color, style, type} * (type defaults to material icons) OR React Native element */ - leftIcon?: IconObject | JSX.Element; + leftIcon?: IconObject | React.ReactElement<{}>; /** * Attaches an onPress on left Icon @@ -1268,7 +1260,7 @@ export interface ListItemProps { * React Native element icon configuration for right icon, either a name from the icon library (like material) or a React Native element like Image. * Shows up unless hideChevron is set */ - rightIcon?: IconObject | JSX.Element; + rightIcon?: IconObject | React.ReactElement<{}>; /** * Attaches an onPress on right Icon @@ -1422,7 +1414,6 @@ export interface ListItemProps { /** * ListItem component - * @see https://react-native-training.github.io/react-native-elements/API/lists/ */ export class ListItem extends React.Component {} @@ -1509,7 +1500,6 @@ export interface PricingCardProps { /** * PricingCard component - * @see https://react-native-training.github.io/react-native-elements/API/pricing/ */ export class PricingCard extends React.Component {} @@ -1591,7 +1581,6 @@ export interface RatingProps { /** * Rating component - * @see https://react-native-training.github.io/react-native-elements/API/rating/ */ export class Rating extends React.Component {} @@ -1789,7 +1778,6 @@ type SearchBarProps = SearchBarWrapperProps & /** * SearchBar component - * @see https://react-native-training.github.io/react-native-elements/API/searchbar/ */ export class SearchBar extends React.Component { /** @@ -1944,7 +1932,6 @@ export interface SliderProps { /** * Slider component - * @see https://react-native-training.github.io/react-native-elements/API/slider/ */ export class Slider extends React.Component {} @@ -2078,7 +2065,6 @@ export interface SocialIconProps { /** * SocialIcon component - * @see https://react-native-training.github.io/react-native-elements/API/social_icons/ */ export class SocialIcon extends React.Component {} @@ -2167,7 +2153,6 @@ export interface TileProps { /** * Tile component - * @see https://react-native-training.github.io/react-native-elements/API/tile/ */ export class Tile extends React.Component {}