(TabViewItem, 'TabViewItem'),
12 | });
13 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/Card.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_title
3 | title: Card.Title
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | Add a general title to the Card.
10 | This, Receives all [Text](text#props) props.
11 |
12 | ## Import
13 |
14 | ```tsx
15 | import { Card } from "@rneui/themed";
16 | ```
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [Text](text#props) props.
22 | :::
23 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/TabView.Item.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: tabview_item
3 | title: TabView.Item
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | They are individual item of the parent Tab.
10 |
11 | ## Import
12 |
13 | ```tsx
14 | import { TabView } from "@rneui/themed";
15 | ```
16 |
17 | ## Props
18 |
19 | :::note
20 | Includes all [View](https://reactnative.dev/docs/view#props) props.
21 | :::
22 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.1/components/ListItem.CheckBox.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_checkbox
3 | title: ListItem.CheckBox
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | This allows adding CheckBox to the ListItem.
11 | This, Receives all [CheckBox](checkbox#props) props.
12 |
13 | ## Props
14 |
15 | :::note
16 | Includes all [CheckBox](checkbox#props) props.
17 | :::
18 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.2/components/ListItem.CheckBox.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_checkbox
3 | title: ListItem.CheckBox
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | This allows adding CheckBox to the ListItem.
11 | This, Receives all [CheckBox](checkbox#props) props.
12 |
13 | ## Props
14 |
15 | :::note
16 | Includes all [CheckBox](checkbox#props) props.
17 | :::
18 |
--------------------------------------------------------------------------------
/packages/base/src/helpers/makeStyles.ts:
--------------------------------------------------------------------------------
1 | import { useMemo } from 'react';
2 | import { StyleSheet } from 'react-native';
3 |
4 | export const makeStyles =
5 | | StyleSheet.NamedStyles>(
6 | styles: T | ((props: P) => T)
7 | ) =>
8 | (props?: P): T => {
9 | return useMemo(() => {
10 | return StyleSheet.create(
11 | typeof styles === 'function' ? styles(props) : styles
12 | );
13 | }, [props]);
14 | };
15 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.1/components/Card.Divider.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_divider
3 | title: Card.Divider
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | Add divider to the card which acts as a separator between elements.
11 | This, Receives all [Divider](divider#props) props.
12 |
13 | ## Props
14 |
15 | :::note
16 | Includes all [Divider](divider#props) props.
17 | :::
18 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.2/components/Card.Divider.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_divider
3 | title: Card.Divider
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | Add divider to the card which acts as a separator between elements.
11 | This, Receives all [Divider](divider#props) props.
12 |
13 | ## Props
14 |
15 | :::note
16 | Includes all [Divider](divider#props) props.
17 | :::
18 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/Card.FeaturedTitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_featuredtitle
3 | title: Card.FeaturedTitle
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | Add a featured title to the Card.
10 | This, Receives all [Text](text#props) props.
11 |
12 | ## Import
13 |
14 | ```tsx
15 | import { Card } from "@rneui/themed";
16 | ```
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [Text](text#props) props.
22 | :::
23 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/Dialog.Button.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_button
3 | title: Dialog.Button
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | This is used to add a button to the Dialog.
10 | Receives all [Button](button#props) props.
11 |
12 | ## Import
13 |
14 | ```tsx
15 | import { Dialog } from "@rneui/themed";
16 | ```
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [Button](button#props) props.
22 | :::
23 |
--------------------------------------------------------------------------------
/packages/themed/src/Chip/__tests__/Chip.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Chip from '../index';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 |
5 | describe('Chip Component', () => {
6 | it.each`
7 | type
8 | ${'solid'}
9 | ${'outline'}
10 | `('should render $type', ({ type }) => {
11 | const { queryByText } = renderWithWrapper(
12 |
13 | );
14 | expect(queryByText(type)).not.toBeNull();
15 | });
16 | });
17 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/Card.FeaturedSubtitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_featuredsubtitle
3 | title: Card.FeaturedSubtitle
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | Add a featured subtitle to the Card.
10 | This, Receives all [Text](text#props) props.
11 |
12 | ## Import
13 |
14 | ```tsx
15 | import { Card } from "@rneui/themed";
16 | ```
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [Text](text#props) props.
22 | :::
23 |
--------------------------------------------------------------------------------
/website/playground/utils/createReactViewBaseConfig.js:
--------------------------------------------------------------------------------
1 | export default function createReactViewBaseConfig(componentName, RNComponent) {
2 | if (!componentName || !RNComponent) {
3 | throw new Error(
4 | 'createBaseComponent needs a componentName name and RNComponent'
5 | );
6 | }
7 |
8 | return {
9 | componentName,
10 | scope: {
11 | RNComponent,
12 | },
13 | imports: {
14 | '@rneui/base': {
15 | named: [componentName],
16 | },
17 | },
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/ListItem.Input.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_input
3 | title: ListItem.Input
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | This allows adding an Text Input within the ListItem.
10 | This, Receives all [Input](Input.mdx#props) props.
11 |
12 | ## Import
13 |
14 | ```tsx
15 | import { ListItem } from "@rneui/themed";
16 | ```
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [Input](input#props) props.
22 | :::
23 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/Card.Divider.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_divider
3 | title: Card.Divider
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | Add divider to the card which acts as a separator between elements.
10 | This, Receives all [Divider](divider#props) props.
11 |
12 | ## Import
13 |
14 | ```tsx
15 | import { Card } from "@rneui/themed";
16 | ```
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [Divider](divider#props) props.
22 | :::
23 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/ListItem.CheckBox.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_checkbox
3 | title: ListItem.CheckBox
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | This allows adding CheckBox to the ListItem.
10 | This, Receives all [CheckBox](checkbox#props) props.
11 |
12 | ## Import
13 |
14 | ```tsx
15 | import { ListItem } from "@rneui/themed";
16 | ```
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [CheckBox](checkbox#props) props.
22 | :::
23 |
--------------------------------------------------------------------------------
/packages/base/src/Image/index.tsx:
--------------------------------------------------------------------------------
1 | import { Image as ImageNative } from 'react-native';
2 | import { Image as RNEImage, ImageProps } from './Image';
3 |
4 | const Image = Object.assign(RNEImage, {
5 | getSize: ImageNative.getSize,
6 | getSizeWithHeaders: ImageNative.getSizeWithHeaders,
7 | prefetch: ImageNative.prefetch,
8 | abortPrefetch: ImageNative.abortPrefetch,
9 | queryCache: ImageNative.queryCache,
10 | resolveAssetSource: ImageNative.resolveAssetSource,
11 | });
12 |
13 | export { Image };
14 | export type { ImageProps };
15 |
--------------------------------------------------------------------------------
/packages/base/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig",
3 | "compilerOptions": {
4 | "allowJs": true /* Allow javascript files to be compiled. */,
5 | "outDir": "dist",
6 | "declaration": true,
7 | "composite": true,
8 | "rootDir": "src"
9 | },
10 | "include": ["src/**/*.tsx", "src/**/*.ts", "src/index.ts"],
11 | "exclude": [
12 | ".ci",
13 | "dist",
14 | "node_modules",
15 | "babel.config.js",
16 | "jest.config.js",
17 | "src/index.d.ts",
18 | "src/**/__tests__"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/lerna.json:
--------------------------------------------------------------------------------
1 | {
2 | "packages": ["packages/*", "example"],
3 | "npmClient": "yarn",
4 | "useWorkspaces": true,
5 | "version": "independent",
6 | "command": {
7 | "publish": {
8 | "allowBranch": "main",
9 | "conventionalCommits": true,
10 | "createRelease": "github",
11 | "message": "chore: publish",
12 | "ignoreChanges": [
13 | "**/__fixtures__/**",
14 | "**/__tests__/**",
15 | "**/*.md",
16 | "**/example/**",
17 | "**/*json"
18 | ]
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/base/src/Slider/components/Rect.tsx:
--------------------------------------------------------------------------------
1 | export class Rect {
2 | x: number;
3 | y: number;
4 | width: number;
5 | height: number;
6 |
7 | constructor(x: number, y: number, width: number, height: number) {
8 | this.x = x;
9 | this.y = y;
10 | this.width = width;
11 | this.height = height;
12 | }
13 |
14 | containsPoint(x: number, y: number) {
15 | return (
16 | x >= this.x &&
17 | y >= this.y &&
18 | x <= this.x + this.width &&
19 | y <= this.y + this.height
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/website/src/pages/sponsor.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Layout from '@theme/Layout';
3 | import OpenCollective from '../components/OpenCollective';
4 | import Sponsor from '../components/Sponsor';
5 | import '../../static/css/components.css';
6 |
7 | const Home: React.FunctionComponent<{}> = () => {
8 | return (
9 |
10 |
11 |
12 |
13 |
14 |
15 | );
16 | };
17 |
18 | export default Home;
19 |
--------------------------------------------------------------------------------
/packages/base/src/TabView/TabView.Item.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { View, ViewProps } from 'react-native';
3 |
4 | import { RneFunctionComponent } from '../helpers';
5 |
6 | export interface TabViewItemProps extends ViewProps {}
7 |
8 | /** They are individual item of the parent Tab. */
9 | export const TabViewItem: RneFunctionComponent = ({
10 | children,
11 | ...rest
12 | }) => {
13 | return {React.isValidElement(children) && children};
14 | };
15 |
16 | TabViewItem.displayName = 'TabView.Item';
17 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-beta.0/main/usage/BottomSheet/BottomSheet.md:
--------------------------------------------------------------------------------
1 | import Snack from './snack/index.md'
2 |
3 |
5 |
6 | **Note:**
7 | Make sure that you have completed [Step 3](getting_started.md#step-3-setup-react-native-safe-area-context) in the setup guide before using `BottomSheet`.
8 |
9 | Overlay Modal that displays content from the bottom of the screen.
10 |
11 |
12 |
--------------------------------------------------------------------------------
/packages/themed/src/SpeedDial/index.tsx:
--------------------------------------------------------------------------------
1 | import { withTheme } from '../config';
2 | import {
3 | SpeedDial,
4 | SpeedDialProps,
5 | } from '@rneui/base/dist/SpeedDial/SpeedDial';
6 | import {
7 | SpeedDialAction,
8 | SpeedDialActionProps,
9 | } from '@rneui/base/dist/SpeedDial/SpeedDial.Action';
10 |
11 | export type { SpeedDialProps, SpeedDialActionProps };
12 | export default Object.assign(
13 | withTheme(SpeedDial, 'SpeedDial'),
14 | {
15 | Action: withTheme(SpeedDialAction, 'SpeedDialAction'),
16 | }
17 | );
18 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/Card.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_title
3 | title: Card.Title
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add a general title to the Card.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/TabView.Item.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: tabview_item
3 | title: TabView.Item
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | They are individual item of the parent Tab.
13 |
14 | ## Import
15 |
16 | ```tsx
17 | import { TabView } from "@rneui/themed";
18 | ```
19 |
20 | ## Props
21 |
22 | :::note
23 | Includes all [View](https://reactnative.dev/docs/view#props) props.
24 | :::
25 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/Card.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_title
3 | title: Card.Title
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add a general title to the Card.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/TabView.Item.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: tabview_item
3 | title: TabView.Item
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | They are individual item of the parent Tab.
13 |
14 | ## Import
15 |
16 | ```tsx
17 | import { TabView } from "@rneui/themed";
18 | ```
19 |
20 | ## Props
21 |
22 | :::note
23 | Includes all [View](https://reactnative.dev/docs/view#props) props.
24 | :::
25 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/Card.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_title
3 | title: Card.Title
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add a general title to the Card.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/TabView.Item.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: tabview_item
3 | title: TabView.Item
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | They are individual item of the parent Tab.
13 |
14 | ## Import
15 |
16 | ```tsx
17 | import { TabView } from "@rneui/themed";
18 | ```
19 |
20 | ## Props
21 |
22 | :::note
23 | Includes all [View](https://reactnative.dev/docs/view#props) props.
24 | :::
25 |
--------------------------------------------------------------------------------
/packages/themed/src/config/theme.ts:
--------------------------------------------------------------------------------
1 | import { Colors } from './colors';
2 | import { ComponentTheme } from './theme.component';
3 | import { ThemeSpacing, defaultSpacing } from '@rneui/base/dist/helpers';
4 | export type RecursivePartial = { [P in keyof T]?: RecursivePartial };
5 |
6 | export type ThemeMode = 'light' | 'dark';
7 |
8 | export { ThemeSpacing, defaultSpacing };
9 |
10 | export interface Theme {
11 | mode: ThemeMode;
12 | spacing: ThemeSpacing;
13 | }
14 |
15 | export interface FullTheme extends ComponentTheme, Theme {
16 | colors: Colors;
17 | }
18 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-3.4.2/text.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: text
3 | title: Text
4 | ---
5 |
6 | import useBaseUrl from '@docusaurus/useBaseUrl';
7 | import Props from './props/text.md'
8 |
9 | Text displays words and characters at various sizes.
10 |
11 |
12 |
13 | ## Usage
14 |
15 | ```js
16 | import { Text } from 'react-native-elements';
17 |
18 | Heading 1
19 | Heading 2
20 | Heading 3
21 | Heading 4
22 | ```
23 |
24 | ---
25 |
26 |
27 |
28 | ---
29 |
--------------------------------------------------------------------------------
/website/blog/authors.yml:
--------------------------------------------------------------------------------
1 | arpitBhalla:
2 | name: Arpit Bhalla
3 | title: GSoC'21 fellow
4 | url: https://github.com/arpitbhalla
5 | image_url: https://github.com/arpitbhalla.png
6 | email: arpitbhallay@proton.me
7 | twitter: arpitbhalla_
8 |
9 | flyingcircle:
10 | name: Jeremy Hamilton
11 | title: Maintainer
12 | url: https://github.com/flyingcircle
13 | image_url: https://github.com/flyingcircle.png
14 |
15 | rneui:
16 | name: RNE Core Team
17 | title: React Native Elements
18 | url: http://twitter.com/rn_elements/
19 | image_url: https://github.com/rneui.png
20 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/Card.FeaturedTitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_featuredtitle
3 | title: Card.FeaturedTitle
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add a featured title to the Card.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/Dialog.Button.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_button
3 | title: Dialog.Button
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This is used to add a button to the Dialog.
13 | Receives all [Button](button#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Dialog } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Button](button#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/Card.FeaturedTitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_featuredtitle
3 | title: Card.FeaturedTitle
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add a featured title to the Card.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/Dialog.Button.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_button
3 | title: Dialog.Button
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This is used to add a button to the Dialog.
13 | Receives all [Button](button#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Dialog } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Button](button#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/Card.FeaturedTitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_featuredtitle
3 | title: Card.FeaturedTitle
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add a featured title to the Card.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/Dialog.Button.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_button
3 | title: Dialog.Button
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This is used to add a button to the Dialog.
13 | Receives all [Button](button#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Dialog } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Button](button#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/example/src/helpers/AssetsCaching.tsx:
--------------------------------------------------------------------------------
1 | import { Image } from 'react-native';
2 | import { FontSource, loadAsync } from 'expo-font';
3 | import { Asset } from 'expo-asset';
4 |
5 | export const cacheFonts = (fonts: (string | Record)[]) => {
6 | return fonts.map((font) => loadAsync(font));
7 | };
8 |
9 | export const cacheImages = (images: string[]) => {
10 | return images.map((image) => {
11 | if (typeof image === 'string') {
12 | return Image.prefetch(image);
13 | } else {
14 | return Asset.fromModule(image).downloadAsync();
15 | }
16 | });
17 | };
18 |
--------------------------------------------------------------------------------
/packages/themed/src/Header/__tests__/Header.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Header from '../index';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 |
5 | describe('Header Component', () => {
6 | it('should apply props from theme', () => {
7 | const { wrapper } = renderWithWrapper(, 'headerContainer', {
8 | components: {
9 | Header: {
10 | backgroundColor: 'pink',
11 | },
12 | },
13 | });
14 | expect(wrapper.props.style).toMatchObject({
15 | backgroundColor: 'pink',
16 | });
17 | });
18 | });
19 |
--------------------------------------------------------------------------------
/packages/themed/src/Icon/__tests__/Icon.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Icon from '../index';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 |
5 | describe('Icon component', () => {
6 | it('should apply values from theme', () => {
7 | const { wrapper } = renderWithWrapper(
8 | ,
9 | 'RNE__ICON__Component',
10 | {
11 | components: {
12 | Icon: {
13 | size: 26,
14 | },
15 | },
16 | }
17 | );
18 | expect(wrapper.props.style[0].fontSize).toBe(26);
19 | });
20 | });
21 |
--------------------------------------------------------------------------------
/packages/themed/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig",
3 | "references": [
4 | {
5 | "path": "../base"
6 | }
7 | ],
8 | "compilerOptions": {
9 | "allowJs": true /* Allow javascript files to be compiled. */,
10 | "outDir": "dist",
11 | "declaration": true,
12 | "composite": true
13 | },
14 | "include": ["src/**/*.tsx", "src/**/*.ts", "src/index.ts"],
15 | "exclude": [
16 | ".ci",
17 | "dist",
18 | "node_modules",
19 | "babel.config.js",
20 | "jest.config.js",
21 | "src/index.d.ts",
22 | "src/**/__tests__"
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/Card.FeaturedSubtitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_featuredsubtitle
3 | title: Card.FeaturedSubtitle
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add a featured subtitle to the Card.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/Card.FeaturedSubtitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_featuredsubtitle
3 | title: Card.FeaturedSubtitle
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add a featured subtitle to the Card.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/Card.FeaturedSubtitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_featuredsubtitle
3 | title: Card.FeaturedSubtitle
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add a featured subtitle to the Card.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/packages/themed/src/TabView/__tests__/TabView.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import TabView from '../index';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 |
5 | describe('Tab Component', () => {
6 | it('should render', () => {
7 | const onValueChange = jest.fn();
8 | const { queryByTestId } = renderWithWrapper(
9 |
10 |
11 |
12 |
13 |
14 | );
15 | expect(queryByTestId('tabView-test')).toBeDefined();
16 | });
17 | });
18 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/ListItem.Input.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_input
3 | title: ListItem.Input
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding an Text Input within the ListItem.
13 | This, Receives all [Input](Input.mdx#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Input](input#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/ListItem.Input.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_input
3 | title: ListItem.Input
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding an Text Input within the ListItem.
13 | This, Receives all [Input](Input.mdx#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Input](input#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/ListItem.Input.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_input
3 | title: ListItem.Input
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding an Text Input within the ListItem.
13 | This, Receives all [Input](Input.mdx#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Input](input#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-3.4.2/props/chip.md:
--------------------------------------------------------------------------------
1 | ## Props
2 |
3 | > This component receives all
4 | > [TouchableNativeFeedback](http://reactnative.dev/docs/touchablenativefeedback.html#props)
5 | > (Android) or
6 | > [TouchableOpacity](http://reactnative.dev/docs/touchableopacity.html#props)
7 | > (iOS) props, along with
8 | > [Button](https://reactnativeelements.com/docs/button/#props)
9 | > props
10 |
11 | ---
12 |
13 | ## Reference
14 |
15 | ### `type`
16 |
17 | Type of button (optional)
18 |
19 | | Type | Default |
20 | | :----------------: | :-----: |
21 | | `solid`, `outline` | solid |
22 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/Card.Divider.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_divider
3 | title: Card.Divider
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add divider to the card which acts as a separator between elements.
13 | This, Receives all [Divider](divider#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Divider](divider#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/ListItem.CheckBox.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_checkbox
3 | title: ListItem.CheckBox
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding CheckBox to the ListItem.
13 | This, Receives all [CheckBox](checkbox#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [CheckBox](checkbox#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/Card.Divider.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_divider
3 | title: Card.Divider
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add divider to the card which acts as a separator between elements.
13 | This, Receives all [Divider](divider#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Divider](divider#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/ListItem.CheckBox.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_checkbox
3 | title: ListItem.CheckBox
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding CheckBox to the ListItem.
13 | This, Receives all [CheckBox](checkbox#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [CheckBox](checkbox#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/Card.Divider.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: card_divider
3 | title: Card.Divider
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Add divider to the card which acts as a separator between elements.
13 | This, Receives all [Divider](divider#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { Card } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Divider](divider#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/ListItem.CheckBox.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_checkbox
3 | title: ListItem.CheckBox
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding CheckBox to the ListItem.
13 | This, Receives all [CheckBox](checkbox#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [CheckBox](checkbox#props) props.
25 | :::
26 |
--------------------------------------------------------------------------------
/website/docs/component_usage/Text.mdx:
--------------------------------------------------------------------------------
1 | ```tsx live
2 | Hello World
3 | ```
4 |
5 | ### Using font-weight on android
6 |
7 | :::note
8 | For Android the font. weights MUST align with the used font. So try out which is the regarding font weight to your used font.
9 | :::
10 |
11 | ```tsx
12 |
13 | h1Style: {
14 | fontFamily: 'Nunito-SemiBold',
15 | fontWeight: '300',
16 | },
17 | h2Style: {
18 | fontFamily: 'Nunito-Regular',
19 | fontWeight: '100',
20 | },
21 | h3Style: {
22 | fontFamily: 'Nunito-Bold',
23 | fontWeight: '500',
24 | },
25 | ```
26 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: 🤔 Questions and Help
4 | url: https://github.com/react-native-elements/react-native-elements/discussions/new
5 | about: Want to ask something? Create new Discussion.
6 | - name: ⚛️ React Native Issues
7 | url: https://github.com/facebook/react-native/issues
8 | about: Please report bugs or issues in the React Native repository.
9 | - name: 😄 Want to say Hi? Join Discord
10 | url: https://discord.com/invite/e9RBHjkKHa
11 | about: Looking for help with your app? Please refer to the React Native Element's discord server.
12 |
--------------------------------------------------------------------------------
/.github/release.yml:
--------------------------------------------------------------------------------
1 | changelog:
2 | exclude:
3 | labels:
4 | - ignore-for-release
5 | - invalid
6 | - Blocked
7 | authors:
8 | - dependabot
9 | categories:
10 | - title: ":boom: Breaking Change"
11 | labels:
12 | - "PR: Breaking Change :boom:"
13 | - title: ":rocket: New Feature"
14 | labels:
15 | - "PR: New Feature :tada:"
16 | - title: ":bug: Bug Fix"
17 | labels:
18 | - "PR: Bug Fix :bug:"
19 | - title: ":memo: Documentation"
20 | labels:
21 | - "PR: Docs :memo:"
22 | - title: Other Changes
23 | labels:
24 | - "*"
25 |
--------------------------------------------------------------------------------
/website/.gitignore:
--------------------------------------------------------------------------------
1 | # dependencies
2 | node_modules
3 |
4 | # production
5 | /build
6 |
7 | # generated files
8 | .docusaurus
9 | .cache-loader
10 |
11 | # misc
12 | .DS_Store
13 | .env.local
14 | .env.development.local
15 | .env.test.local
16 | .env.production.local
17 |
18 | npm-debug.log*
19 | yarn-debug.log*
20 | yarn-error.log*
21 | .pnp.*
22 | .yarn/*
23 | !.yarn/patches
24 | !.yarn/plugins
25 | !.yarn/releases
26 | !.yarn/sdks
27 | !.yarn/versions
28 |
29 | website/docs/main/Component.md
30 | website/translated_docs
31 | website/build/
32 | website/yarn.lock
33 | website/node_modules
34 |
35 | website/i18n/*
36 | !website/i18n/en.json
37 |
--------------------------------------------------------------------------------
/packages/base/src/Tooltip/__tests__/__snapshots__/Triangle.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Tooltip component should match snapshot 1`] = `
4 |
21 | `;
22 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/component_usage/Text.mdx:
--------------------------------------------------------------------------------
1 | ```tsx live
2 | Hello World
3 | ```
4 |
5 | ### Using font-weight on android
6 |
7 | :::note
8 | For Android the font. weights MUST align with the used font. So try out which is the regarding font weight to your used font.
9 | :::
10 |
11 | ```tsx
12 |
13 | h1Style: {
14 | fontFamily: 'Nunito-SemiBold',
15 | fontWeight: '300',
16 | },
17 | h2Style: {
18 | fontFamily: 'Nunito-Regular',
19 | fontWeight: '100',
20 | },
21 | h3Style: {
22 | fontFamily: 'Nunito-Bold',
23 | fontWeight: '500',
24 | },
25 | ```
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/component_usage/Text.mdx:
--------------------------------------------------------------------------------
1 | ```tsx live
2 | Hello World
3 | ```
4 |
5 | ### Using font-weight on android
6 |
7 | :::note
8 | For Android the font. weights MUST align with the used font. So try out which is the regarding font weight to your used font.
9 | :::
10 |
11 | ```tsx
12 |
13 | h1Style: {
14 | fontFamily: 'Nunito-SemiBold',
15 | fontWeight: '300',
16 | },
17 | h2Style: {
18 | fontFamily: 'Nunito-Regular',
19 | fontWeight: '100',
20 | },
21 | h3Style: {
22 | fontFamily: 'Nunito-Bold',
23 | fontWeight: '500',
24 | },
25 | ```
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/component_usage/Text.mdx:
--------------------------------------------------------------------------------
1 | ```tsx live
2 | Hello World
3 | ```
4 |
5 | ### Using font-weight on android
6 |
7 | :::note
8 | For Android the font. weights MUST align with the used font. So try out which is the regarding font weight to your used font.
9 | :::
10 |
11 | ```tsx
12 |
13 | h1Style: {
14 | fontFamily: 'Nunito-SemiBold',
15 | fontWeight: '300',
16 | },
17 | h2Style: {
18 | fontFamily: 'Nunito-Regular',
19 | fontWeight: '100',
20 | },
21 | h3Style: {
22 | fontFamily: 'Nunito-Bold',
23 | fontWeight: '500',
24 | },
25 | ```
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/component_usage/Text.mdx:
--------------------------------------------------------------------------------
1 | ```tsx live
2 | Hello World
3 | ```
4 |
5 | ### Using font-weight on android
6 |
7 | :::note
8 | For Android the font. weights MUST align with the used font. So try out which is the regarding font weight to your used font.
9 | :::
10 |
11 | ```tsx
12 |
13 | h1Style: {
14 | fontFamily: 'Nunito-SemiBold',
15 | fontWeight: '300',
16 | },
17 | h2Style: {
18 | fontFamily: 'Nunito-Regular',
19 | fontWeight: '100',
20 | },
21 | h3Style: {
22 | fontFamily: 'Nunito-Bold',
23 | fontWeight: '500',
24 | },
25 | ```
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.7/component_usage/Text.mdx:
--------------------------------------------------------------------------------
1 | ```tsx live
2 | Hello World
3 | ```
4 |
5 | ### Using font-weight on android
6 |
7 | :::note
8 | For Android the font. weights MUST align with the used font. So try out which is the regarding font weight to your used font.
9 | :::
10 |
11 | ```tsx
12 |
13 | h1Style: {
14 | fontFamily: 'Nunito-SemiBold',
15 | fontWeight: '300',
16 | },
17 | h2Style: {
18 | fontFamily: 'Nunito-Regular',
19 | fontWeight: '100',
20 | },
21 | h3Style: {
22 | fontFamily: 'Nunito-Bold',
23 | fontWeight: '500',
24 | },
25 | ```
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-beta.0/main/Chip.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: chip
3 |
4 | title: Chip
5 |
6 | slug: /chip
7 | ---
8 |
9 | import Usage from './usage/Chip/Chip.md'
10 |
11 | Chips are compact elements that represent an input, attribute, or action.
12 |
13 | They may display text, icons, or both.
14 |
15 | ## Usage
16 |
17 |
18 |
19 | ---
20 |
21 | ## Props
22 |
23 | ### Chip
24 |
25 | - [type](#type)
26 |
27 | ## Reference
28 |
29 | ### Chip
30 |
31 | #### type
32 |
33 | Type of button.
34 |
35 | | Type | Default |
36 | | -------------------- | ------- |
37 | | "solid" or "outline" | None |
38 |
39 | ---
40 |
--------------------------------------------------------------------------------
/website/static/img/logo-icon.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/packages/themed/src/FAB/__tests__/FAB.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Animated } from 'react-native';
3 | import FAB from '..';
4 | import { renderWithWrapper } from '../../../.ci/testHelper';
5 |
6 | describe('FAB Component', () => {
7 | it('render with theme', () => {
8 | const { wrapper } = renderWithWrapper(, '', {
9 | components: {
10 | FAB: {
11 | placement: 'right',
12 | },
13 | },
14 | });
15 | expect(wrapper.findByType(Animated.View).props.style).toMatchObject({
16 | position: 'absolute',
17 | bottom: 0,
18 | right: 0,
19 | });
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/packages/themed/src/Image/index.tsx:
--------------------------------------------------------------------------------
1 | import { Image as ImageNative } from 'react-native';
2 | import { withTheme } from '../config';
3 | import { Image, ImageProps } from '@rneui/base/dist/Image/Image';
4 |
5 | export { Image };
6 | export type { ImageProps };
7 |
8 | const ThemedImage = Object.assign(withTheme(Image, 'Image'), {
9 | getSize: ImageNative.getSize,
10 | getSizeWithHeaders: ImageNative.getSizeWithHeaders,
11 | prefetch: ImageNative.prefetch,
12 | abortPrefetch: ImageNative.abortPrefetch,
13 | queryCache: ImageNative.queryCache,
14 | resolveAssetSource: ImageNative.resolveAssetSource,
15 | });
16 |
17 | export default ThemedImage;
18 |
--------------------------------------------------------------------------------
/packages/themed/src/Tile/__tests__/FeaturedTile.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { FeaturedTile } from '..';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 |
5 | describe('FeaturedTitle component', () => {
6 | it('should apply values from theme', () => {
7 | const theme = {
8 | FeaturedTile: {
9 | title: 'I am featured',
10 | },
11 | };
12 | const { queryByText } = renderWithWrapper(
13 | ,
14 | '',
15 | { components: theme }
16 | );
17 | expect(queryByText('I am featured')).not.toBeNull();
18 | });
19 | });
20 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-beta.0/main/usage/Rating/Rating.md:
--------------------------------------------------------------------------------
1 | import Snack from './snack/index.md'
2 |
3 |
4 |
5 |
6 |
7 | ### Read-only mode
8 |
9 | ```js
10 | const { rating } = this.props;
11 |
12 | ;
13 | ```
14 |
15 | ### Fractions
16 |
17 | ```html
18 |
19 | ```
20 |
21 | 
22 |
--------------------------------------------------------------------------------
/packages/themed/src/SearchBar/index.tsx:
--------------------------------------------------------------------------------
1 | import { withTheme } from '../config';
2 | import {
3 | SearchBar,
4 | SearchBarProps,
5 | } from '@rneui/base/dist/SearchBar/SearchBar';
6 | import { SearchBarAndroidProps } from '@rneui/base/dist/SearchBar/SearchBar-android';
7 | import { SearchBarIosProps } from '@rneui/base/dist/SearchBar/SearchBar-ios';
8 | import { SearchBarDefaultProps } from '@rneui/base/dist/SearchBar/SearchBar-default';
9 |
10 | export { SearchBar };
11 | export type {
12 | SearchBarProps,
13 | SearchBarAndroidProps,
14 | SearchBarDefaultProps,
15 | SearchBarIosProps,
16 | };
17 |
18 | export default withTheme(SearchBar, 'SearchBar');
19 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.1/components/Dialog.Actions.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_actions
3 | title: Dialog.Actions
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | Define Dialog Actions using this component.
11 |
12 | ## Props
13 |
14 |
15 |
16 | | Name | Type | Default | Description |
17 | | ---------- | --------- | ------- | --------------------------------------------------- |
18 | | `children` | ReactNode | | Add Enclosed components as an action to the dialog. |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.2/components/Dialog.Actions.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_actions
3 | title: Dialog.Actions
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | Define Dialog Actions using this component.
11 |
12 | ## Props
13 |
14 |
15 |
16 | | Name | Type | Default | Description |
17 | | ---------- | --------- | ------- | --------------------------------------------------- |
18 | | `children` | ReactNode | | Add Enclosed components as an action to the dialog. |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.github/workflows/expo.yml:
--------------------------------------------------------------------------------
1 | name: (manual) Expo default Channel
2 |
3 | on: workflow_dispatch
4 |
5 | jobs:
6 | publish:
7 | continue-on-error: true
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - name: 🏗 Setup repo
12 | uses: actions/checkout@v2
13 |
14 | - name: Install dependencies
15 | uses: ./.github/actions/install
16 |
17 | - name: 🏗 Setup Expo
18 | uses: expo/expo-github-action@v7
19 | with:
20 | expo-version: latest
21 | token: ${{ secrets.EXPO_TOKEN }}
22 |
23 | - name: 🚀 Publish preview
24 | run: |
25 | cd example
26 | expo publish --non-interactive
27 |
--------------------------------------------------------------------------------
/packages/themed/src/Switch/__tests__/Switch.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Switch from '../index';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 | import { CreateThemeOptions, FullTheme } from '../../config';
5 |
6 | describe('Switch Component', () => {
7 | it('should apply from theme', () => {
8 | const theme: Partial = {
9 | components: {
10 | Switch: {
11 | color: 'purple',
12 | },
13 | },
14 | };
15 | const { wrapper } = renderWithWrapper(, 'RNE__SWITCH', theme);
16 | expect(wrapper.props).toMatchObject({
17 | onTintColor: 'purple',
18 | });
19 | });
20 | });
21 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.1/components/ListItem.Content.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_content
3 | title: ListItem.Content
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | This allows adding content to the ListItem.
11 | This, Receives all [View](https://reactnative.dev/docs/view#props) props.
12 |
13 | ## Props
14 |
15 | :::note
16 | Includes all [Text](text#props) props.
17 | :::
18 |
19 |
20 |
21 | | Name | Type | Default | Description |
22 | | ------- | ------- | ------- | ----------- |
23 | | `right` | boolean | | |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.2/components/ListItem.Content.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_content
3 | title: ListItem.Content
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | This allows adding content to the ListItem.
11 | This, Receives all [View](https://reactnative.dev/docs/view#props) props.
12 |
13 | ## Props
14 |
15 | :::note
16 | Includes all [Text](text#props) props.
17 | :::
18 |
19 |
20 |
21 | | Name | Type | Default | Description |
22 | | ------- | ------- | ------- | ----------- |
23 | | `right` | boolean | | |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/packages/themed/src/Dialog/__tests__/Dialog.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Dialog from '..';
3 | import { CreateThemeOptions } from '../..';
4 | import { renderWithWrapper } from '../../../.ci/testHelper';
5 |
6 | describe('Dialog Component', () => {
7 | it('should apply props from theme', () => {
8 | const theme: Partial = {
9 | components: {
10 | Dialog: {
11 | transparent: false,
12 | },
13 | },
14 | };
15 | const { wrapper } = renderWithWrapper(
16 | ,
17 | 'Internal__Overlay',
18 | theme
19 | );
20 | expect(wrapper.props.transparent).toBeFalsy();
21 | });
22 | });
23 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.1/components/ListItem.Subtitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_subtitle
3 | title: ListItem.Subtitle
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | This allows adding SubTitle to the ListItem.
11 | This, Receives all [Text](text#props) props.
12 |
13 | ## Props
14 |
15 | :::note
16 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
17 | :::
18 |
19 |
20 |
21 | | Name | Type | Default | Description |
22 | | ------- | ------- | ------- | ----------- |
23 | | `right` | boolean | | |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.2/components/ListItem.Subtitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_subtitle
3 | title: ListItem.Subtitle
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | This allows adding SubTitle to the ListItem.
11 | This, Receives all [Text](text#props) props.
12 |
13 | ## Props
14 |
15 | :::note
16 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
17 | :::
18 |
19 |
20 |
21 | | Name | Type | Default | Description |
22 | | ------- | ------- | ------- | ----------- |
23 | | `right` | boolean | | |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/packages/base/src/Dialog/index.tsx:
--------------------------------------------------------------------------------
1 | import { DialogLoading, DialogLoadingProps } from './Dialog.Loading';
2 | import { DialogTitle, DialogTitleProps } from './Dialog.Title';
3 | import { DialogButton, DialogButtonProps } from './Dialog.Button';
4 | import { DialogActions, DialogActionsProps } from './Dialog.Actions';
5 | import { DialogBase, DialogProps } from './Dialog';
6 |
7 | export const Dialog = Object.assign(DialogBase, {
8 | Loading: DialogLoading,
9 | Title: DialogTitle,
10 | Actions: DialogActions,
11 | Button: DialogButton,
12 | });
13 |
14 | export type {
15 | DialogProps,
16 | DialogLoadingProps,
17 | DialogButtonProps,
18 | DialogTitleProps,
19 | DialogActionsProps,
20 | };
21 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-3.4.2/divider.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: divider
3 | title: Divider
4 | ---
5 |
6 | import Props from './props/divider.md'
7 |
8 | Dividers are visual separators of content. Use Divider when you want to make a
9 | distinction between sections of content.
10 |
11 | ## Usage
12 |
13 | ```js
14 | import { Divider } from 'react-native-elements';
15 |
16 | ;
17 |
18 | ;
19 |
20 | ;
21 |
22 | ;
27 | ```
28 |
29 | ---
30 |
31 |
32 |
33 | ---
34 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-beta.0/main/usage/Tooltip/Tooltip.md:
--------------------------------------------------------------------------------
1 | import Snack from './snack/index.md'
2 |
3 |
4 |
5 |
6 |
7 | ---
8 |
9 | > **Web-platform specific note**:
10 | >
11 | > You **must** pass a valid React Native [`Modal`](https://reactnative.dev/docs/modal) component implementation
12 | > into [`ModalComponent`](#modalcomponent) prop because `Modal` component is not implemented yet in `react-native-web`
13 |
14 | ```js
15 | ...
16 | import Modal from 'modal-react-native-web';
17 |
18 | ...
19 |
20 |
21 | ...
22 | ```
23 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.1/components/ListItem.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_title
3 | title: ListItem.Title
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | This allows adding Title to the ListItem.
11 | This, Receives all [Text](text#props) props.
12 |
13 | ## Props
14 |
15 | :::note
16 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
17 | :::
18 |
19 |
20 |
21 | | Name | Type | Default | Description |
22 | | ------- | ------- | ------- | ---------------- |
23 | | `right` | boolean | | Add right title. |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.2/components/ListItem.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_title
3 | title: ListItem.Title
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | This allows adding Title to the ListItem.
11 | This, Receives all [Text](text#props) props.
12 |
13 | ## Props
14 |
15 | :::note
16 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
17 | :::
18 |
19 |
20 |
21 | | Name | Type | Default | Description |
22 | | ------- | ------- | ------- | ---------------- |
23 | | `right` | boolean | | Add right title. |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/packages/themed/src/Badge/__tests__/withBadge.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { TouchableOpacity } from 'react-native';
3 | import { withBadge } from '../index';
4 | import { renderWithWrapper } from '../../../.ci/testHelper';
5 |
6 | describe('withBadge HOC', () => {
7 | it('should render', () => {
8 | const options = {
9 | top: 0,
10 | bottom: 5,
11 | };
12 | const BadgedComponent = withBadge(1, options)(TouchableOpacity);
13 | const { wrapper } = renderWithWrapper(
14 | ,
15 | 'RNE__Badge__Container'
16 | );
17 | expect(wrapper.props.style).toMatchObject({
18 | top: 0,
19 | bottom: 5,
20 | });
21 | });
22 | });
23 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.2/components/SpeedDial.Action.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: speeddial_action
3 | title: SpeedDial.Action
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | Adds Action to the SpeedDial.
11 | This, Receive all [Fab](fab#props) props.
12 |
13 | ## Props
14 |
15 | :::note
16 | Includes all [FAB](fab#props) props.
17 | :::
18 |
19 |
20 |
21 | | Name | Type | Default | Description |
22 | | ---------------- | ------- | ------- | ---------------------- |
23 | | `labelPressable` | boolean | | onPress on Label Press |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/packages/themed/src/SocialIcon/__tests__/SocialIcon.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import SocialIcon from '..';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 | import { Icon } from '../../Icon';
5 |
6 | describe('SocialIcon component', () => {
7 | it('should apply values from theme', () => {
8 | const { queryByTestId } = renderWithWrapper(, '', {
9 | components: {
10 | SocialIcon: {
11 | type: 'facebook',
12 | },
13 | },
14 | });
15 | const rootComponent = queryByTestId('RNE_SocialIcon')!;
16 | const iconComponent = rootComponent.findByType(Icon);
17 | expect(iconComponent.props.name).toBe('facebook');
18 | });
19 | });
20 |
--------------------------------------------------------------------------------
/packages/base/src/Avatar/__tests__/Accessory.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Avatar } from '..';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 |
5 | describe('Accessory Component', () => {
6 | jest.useFakeTimers();
7 | it('should uses Icon', () => {
8 | const component = renderWithWrapper();
9 | expect(component.toJSON()).toMatchSnapshot();
10 | });
11 | it('should uses Image', () => {
12 | const { wrapper } = renderWithWrapper(
13 | ,
14 | 'RNE__Image'
15 | );
16 | expect(wrapper.props.source.uri).toMatch('https://i.imgur.com/0y8Ftya.jpg');
17 | });
18 | });
19 |
--------------------------------------------------------------------------------
/website/src/theme/ReactLiveScope/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | import React from 'react';
9 | import * as RNE from 'react-native-elements';
10 | import * as RNEUI from '@rneui/base';
11 | import * as RNEUI_Layout from '@rneui/layout';
12 | import LinearGradient from 'react-native-linear-gradient';
13 |
14 | // Add react-live imports you need here
15 | const ReactLiveScope = {
16 | React,
17 | LinearGradient,
18 | ...RNE,
19 | ...RNEUI,
20 | ...RNEUI_Layout,
21 | ...React,
22 | };
23 |
24 | export default ReactLiveScope;
25 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/Dialog.Actions.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_actions
3 | title: Dialog.Actions
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | Define Dialog Actions using this component.
10 |
11 | ## Import
12 |
13 | ```tsx
14 | import { Dialog } from "@rneui/themed";
15 | ```
16 |
17 | ## Props
18 |
19 |
20 |
21 | | Name | Type | Default | Description |
22 | | ---------- | --------- | ------- | --------------------------------------------------- |
23 | | `children` | ReactNode | | Add Enclosed components as an action to the dialog. |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/packages/base/src/SpeedDial/__tests__/SpeedDial.Action.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { fireEvent } from '@testing-library/react-native';
3 | import { SpeedDial } from '..';
4 | import { renderWithWrapper } from '../../../.ci/testHelper';
5 |
6 | describe('Speed Dial Action', () => {
7 | it('should have onPress event', () => {
8 | const onPress = jest.fn();
9 | const { getByText } = renderWithWrapper(
10 |
15 | );
16 | const title = getByText('Delete');
17 | fireEvent(title, 'press');
18 | expect(onPress).toHaveBeenCalled();
19 | });
20 | });
21 |
--------------------------------------------------------------------------------
/packages/themed/src/SearchBar/__tests__/SearchBar.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import SearchBar from '../index';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 |
5 | describe('SearchBar wrapper component', () => {
6 | it('should apply values from theme', () => {
7 | const theme = {
8 | SearchBar: {
9 | placeholder: 'Enter search term',
10 | },
11 | };
12 | const component = renderWithWrapper(, '', {
13 | components: theme,
14 | });
15 | expect(component.queryByTestId('RNE__SearchBar').props.placeholder).toBe(
16 | 'Enter search term'
17 | );
18 | expect(component.toJSON()).toMatchSnapshot();
19 | });
20 | });
21 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-beta.0/main/usage/Dialog/Dialog.md:
--------------------------------------------------------------------------------
1 | import Snack from './snack/index.md'
2 |
3 |
5 |
6 |
7 |
8 | > **Web-platform specific note**:
9 | >
10 | > You **must** pass a valid React Native [`Modal`](https://reactnative.dev/docs/modal) component implementation
11 | > into [`ModalComponent`](#modalcomponent) prop because `Modal` component is not implemented yet in `react-native-web`
12 |
13 | ```jsx
14 | ...
15 | import Modal from 'modal-react-native-web';
16 |
17 | ...
18 |
19 |
20 | ...
21 | ```
22 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature-request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 💡 Feature Request
3 | about: Suggest an idea or enhancement for this project
4 | ---
5 |
6 | **Is your feature request related to a problem? Please Describe.**
7 |
8 |
9 |
10 | **Describe the solution you'd like**
11 |
12 |
13 |
14 | **Describe alternatives you've considered**
15 |
16 |
17 |
18 | **Additional context**
19 |
20 |
21 |
--------------------------------------------------------------------------------
/example/src/config/fonts.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | ios: {
3 | regular: 'System',
4 | light: 'System',
5 | lightItalic: 'System',
6 | bold: 'System',
7 | boldItalic: 'System',
8 | black: 'System',
9 | blackItalic: 'System',
10 | },
11 | android: {
12 | regular: 'Roboto',
13 | italic: 'Roboto-Italic',
14 | thin: 'Roboto-Thin',
15 | thinItalic: 'Roboto-ThinItalic',
16 | light: 'Roboto-Light',
17 | lightItalic: 'Roboto-LightItalic',
18 | medium: 'Roboto-Medium',
19 | mediumItalic: 'Roboto-MediumItalic',
20 | bold: 'Roboto-Bold',
21 | boldItalic: 'Roboto-BoldItalic',
22 | condensed: 'RobotoCondensed-Regular',
23 | condensedItalic: 'RobotoCondensed-Italic',
24 | },
25 | };
26 |
--------------------------------------------------------------------------------
/packages/themed/src/Divider/__tests__/Divider.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Divider from '../index';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 | import { CreateThemeOptions, FullTheme } from '../../config';
5 |
6 | describe('Divider Component', () => {
7 | it('should apply values from theme', () => {
8 | const theme: Partial = {
9 | components: {
10 | Divider: {
11 | style: {
12 | backgroundColor: 'red',
13 | },
14 | },
15 | },
16 | };
17 | const { wrapper } = renderWithWrapper(, 'RNE__Divider', theme);
18 | expect(wrapper.props.style).toMatchObject({ backgroundColor: 'red' });
19 | });
20 | });
21 |
--------------------------------------------------------------------------------
/packages/themed/src/Input/__tests__/Input.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Input from '../index';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 | import { CreateThemeOptions, FullTheme } from '../../config';
5 |
6 | describe('Input component', () => {
7 | it('should apply values from theme', () => {
8 | const testTheme: Partial = {
9 | components: {
10 | Input: {
11 | placeholder: 'Enter text',
12 | },
13 | },
14 | };
15 | const { queryByTestId } = renderWithWrapper(, '', testTheme);
16 | const component = queryByTestId('RNE__Input__text-input')!;
17 | expect(component.props.placeholder).toBe('Enter text');
18 | });
19 | });
20 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/ListItem.Content.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_content
3 | title: ListItem.Content
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | This allows adding content to the ListItem.
10 | This, Receives all [View](https://reactnative.dev/docs/view#props) props.
11 |
12 | ## Import
13 |
14 | ```tsx
15 | import { ListItem } from "@rneui/themed";
16 | ```
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [Text](text#props) props.
22 | :::
23 |
24 |
25 |
26 | | Name | Type | Default | Description |
27 | | ------- | ------- | ------- | ----------- |
28 | | `right` | boolean | | |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/packages/base/src/Card/Card.Image.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StyleSheet } from 'react-native';
3 | import { RneFunctionComponent } from '../helpers';
4 | import { ImageProps, Image } from '../Image';
5 |
6 | export interface CardImageProps extends ImageProps {}
7 |
8 | /** Add information in the form of image to the card.
9 | * This, Receives all [Image](Image.mdx#props) props. */
10 | export const CardImage: RneFunctionComponent = ({
11 | style,
12 | ...props
13 | }) => ;
14 |
15 | const styles = StyleSheet.create({
16 | image: {
17 | width: null,
18 | height: 150,
19 | },
20 | });
21 |
22 | CardImage.displayName = 'Card.Image';
23 |
--------------------------------------------------------------------------------
/packages/themed/src/CheckBox/__tests__/CheckBox.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import CheckBox from '..';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 | import { CreateThemeOptions, FullTheme } from '../../config';
5 |
6 | describe('CheckBox Component', () => {
7 | it('should use values from theme', () => {
8 | const testTheme: Partial = {
9 | components: {
10 | CheckBox: {
11 | title: 'George is Cool',
12 | },
13 | },
14 | };
15 | const { wrapper } = renderWithWrapper(
16 | ,
17 | 'RNE__CheckBox__Title',
18 | testTheme
19 | );
20 | expect(wrapper.props.children).toBe('George is Cool');
21 | });
22 | });
23 |
--------------------------------------------------------------------------------
/packages/themed/src/Tab/__tests__/Tab.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Tab from '../index';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 | import { fireEvent } from '@testing-library/react-native';
5 |
6 | describe('Tab Component', () => {
7 | it('should render', () => {
8 | const changeTab = jest.fn();
9 | const { queryAllByRole } = renderWithWrapper(
10 |
11 |
16 |
17 | );
18 |
19 | const tabs = queryAllByRole('tab');
20 | fireEvent(tabs[0], 'press');
21 | expect(tabs.length).toBe(1);
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-beta.0/main/usage/Overlay/Overlay.md:
--------------------------------------------------------------------------------
1 | import Snack from './snack/index.md'
2 |
3 |
4 |
5 |
7 |
8 | ---
9 |
10 | > **Web-platform specific note**:
11 | >
12 | > You **must** pass a valid React Native [`Modal`](https://reactnative.dev/docs/modal) component implementation
13 | > into [`ModalComponent`](#modalcomponent) prop because `Modal` component is not implemented yet in `react-native-web`
14 |
15 | ```jsx
16 | ...
17 | import Modal from 'modal-react-native-web';
18 |
19 | ...
20 |
21 |
22 | ...
23 | ```
24 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/ListItem.Subtitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_subtitle
3 | title: ListItem.Subtitle
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | This allows adding SubTitle to the ListItem.
10 | This, Receives all [Text](text#props) props.
11 |
12 | ## Import
13 |
14 | ```tsx
15 | import { ListItem } from "@rneui/themed";
16 | ```
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
22 | :::
23 |
24 |
25 |
26 | | Name | Type | Default | Description |
27 | | ------- | ------- | ------- | ----------- |
28 | | `right` | boolean | | |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/ListItem.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_title
3 | title: ListItem.Title
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | This allows adding Title to the ListItem.
10 | This, Receives all [Text](text#props) props.
11 |
12 | ## Import
13 |
14 | ```tsx
15 | import { ListItem } from "@rneui/themed";
16 | ```
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
22 | :::
23 |
24 |
25 |
26 | | Name | Type | Default | Description |
27 | | ------- | ------- | ------- | ---------------- |
28 | | `right` | boolean | | Add right title. |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/packages/themed/src/Badge/__tests__/Badge.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Badge from '..';
3 | import { Text } from 'react-native';
4 | import { renderWithWrapper } from '../../../.ci/testHelper';
5 | import { CreateThemeOptions } from '../../config';
6 |
7 | describe('Badge Component', () => {
8 | it('should use values set by the theme', () => {
9 | const testTheme: Partial = {
10 | components: {
11 | Badge: {
12 | textStyle: { color: 'red' },
13 | },
14 | },
15 | };
16 | const { wrapper } = renderWithWrapper(, '', testTheme);
17 | expect(wrapper.findByType(Text).props.style).toMatchObject({
18 | color: 'red',
19 | });
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-3.4.2/fab.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: fab
3 | title: Floating Action Button
4 | ---
5 |
6 | import Props from './props/fab.md'
7 |
8 | A floating action button (FAB) performs the primary, or most common, action on a screen. It appears in front of all screen content, typically as a circular shape with an icon in its center.
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | ## Usage
17 |
18 | ```js
19 | import { FAB } from 'react-native-elements';
20 | ```
21 |
22 | ```js
23 |
24 | ```
25 |
26 | ---
27 |
28 | ## Props
29 |
30 |
31 |
32 | ---
33 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/SpeedDial.Action.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: speeddial_action
3 | title: SpeedDial.Action
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 |
9 | Adds Action to the SpeedDial.
10 | This, Receive all [Fab](fab#props) props.
11 |
12 | ## Import
13 |
14 | ```tsx
15 | import { SpeedDial } from "@rneui/themed";
16 | ```
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [FAB](fab#props) props.
22 | :::
23 |
24 |
25 |
26 | | Name | Type | Default | Description |
27 | | ---------------- | ------- | ------- | ---------------------- |
28 | | `labelPressable` | boolean | | onPress on Label Press |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-3.4.2/pricing.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: pricing
3 | title: Pricing
4 | ---
5 |
6 | import useBaseUrl from '@docusaurus/useBaseUrl';
7 | import Props from './props/pricing.md'
8 |
9 | Pricing is a convenience component used to display features and pricing tables
10 | in a beautiful and engaging way.
11 |
12 |
13 |
14 | ## Usage
15 |
16 | ```js
17 | import { PricingCard } from 'react-native-elements';
18 |
19 | ;
26 | ```
27 |
28 | ---
29 |
30 |
31 |
32 | ---
33 |
--------------------------------------------------------------------------------
/packages/base/src/Card/Card.Divider.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StyleSheet } from 'react-native';
3 | import { DividerProps, Divider } from '../Divider';
4 | import { RneFunctionComponent } from '../helpers';
5 |
6 | export interface CardDividerProps extends DividerProps {}
7 |
8 | /** Add divider to the card which acts as a separator between elements.
9 | * This, Receives all [Divider](divider#props) props. */
10 | export const CardDivider: RneFunctionComponent = ({
11 | style,
12 | ...rest
13 | }) => ;
14 |
15 | const styles = StyleSheet.create({
16 | divider: {
17 | marginBottom: 15,
18 | },
19 | });
20 |
21 | CardDivider.displayName = 'Card.Divider';
22 |
--------------------------------------------------------------------------------
/packages/themed/src/Avatar/__tests__/Avatar.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Avatar from '..';
3 | import { Image } from 'react-native';
4 | import { renderWithWrapper } from '../../../.ci/testHelper';
5 | import { CreateThemeOptions, FullTheme } from '../../config';
6 |
7 | describe('Avatar Component', () => {
8 | it('should apply values from theme', () => {
9 | const theme: Partial = {
10 | components: {
11 | Avatar: {
12 | source: { uri: 'https://i.imgur.com/0y8Ftya.jpg' },
13 | },
14 | },
15 | };
16 | const { wrapper } = renderWithWrapper(, '', theme);
17 | expect(wrapper.findByType(Image).props.source.uri).toBe(
18 | 'https://i.imgur.com/0y8Ftya.jpg'
19 | );
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/packages/base/src/Switch/__tests__/__snapshots__/Switch.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Switch Component should match snapshot 1`] = `
4 |
7 |
30 |
31 | `;
32 |
--------------------------------------------------------------------------------
/packages/themed/src/Slider/__tests__/Slider.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Slider from '../index';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 | import { CreateThemeOptions } from '../..';
5 |
6 | describe('Slider component', () => {
7 | it('should apply values from theme', () => {
8 | const theme: Partial = {
9 | components: {
10 | Slider: {
11 | thumbTintColor: 'blue',
12 | },
13 | },
14 | };
15 | const { wrapper } = renderWithWrapper(
16 | ,
17 | 'RNE__Slider_Thumb',
18 | theme
19 | );
20 | expect(wrapper.props.style).toMatchObject({
21 | backgroundColor: 'blue',
22 | });
23 | });
24 | });
25 |
--------------------------------------------------------------------------------
/packages/themed/src/Card/__tests__/Card.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Card from '..';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 |
5 | describe('Card Component', () => {
6 | it('should render', () => {
7 | const { queryByText } = renderWithWrapper(
8 |
9 | featured title
10 | featured sub title
11 |
16 |
17 | );
18 | expect(queryByText('featured title')).toBeTruthy();
19 | expect(queryByText('featured sub title')).toBeTruthy();
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/example/src/helpers/ThemeReducer.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export const initialState = { themeMode: 'light' };
4 | export function ThemeReducer(
5 | state: { themeMode: string },
6 | action: { type: string; payload: string }
7 | ) {
8 | const { payload } = action;
9 | switch (action.type) {
10 | case 'set-theme':
11 | return { ...state, themeMode: payload === 'light' ? 'light' : 'dark' };
12 | default:
13 | return state;
14 | }
15 | }
16 |
17 | // added null in the create context so that tsc issues are fixed. Refer https://stackoverflow.com/questions/54577865/react-createcontext-issue-in-typescript/54667477
18 | export const ThemeReducerContext = React.createContext({
19 | ThemeState: { themeMode: 'light' },
20 | dispatch: ({ type, payload }) => {},
21 | });
22 |
--------------------------------------------------------------------------------
/website/docs/component_usage/Switch.mdx:
--------------------------------------------------------------------------------
1 | ```SnackPlayer name=RNE Switch
2 | import React, { useState } from 'react';
3 | import { Switch } from '@rneui/themed';
4 | import { View, Text, StyleSheet } from 'react-native';
5 |
6 | type SwitchComponentProps = {};
7 |
8 | const SwitchComponent: React.FunctionComponent = () => {
9 | const [checked, setChecked] = useState(false);
10 |
11 | const toggleSwitch = () => {
12 | setChecked(!checked);
13 | };
14 |
15 | return (
16 |
17 | setChecked(value)}
20 | />
21 |
22 | );
23 | };
24 |
25 | const styles = StyleSheet.create({
26 | view: {
27 | margin: 10,
28 | },
29 | });
30 |
31 | export default SwitchComponent;
32 | ```
33 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.1/components/Chip.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: chip
3 | title: Chip
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 | import Usage from "../component_usage/Chip.mdx";
10 |
11 | Chips are compact elements that represent an input, attribute, or action.
12 | They may display text, icons, or both.
13 |
14 | ## Usage
15 |
16 |
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [Button](button#props) props.
22 | :::
23 |
24 |
25 |
26 | | Name | Type | Default | Description |
27 | | ------ | -------------------- | ------- | --------------- |
28 | | `type` | `solid` or `outline` | | Type of button. |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.2/components/Chip.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: chip
3 | title: Chip
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 | import Usage from "../component_usage/Chip.mdx";
10 |
11 | Chips are compact elements that represent an input, attribute, or action.
12 | They may display text, icons, or both.
13 |
14 | ## Usage
15 |
16 |
17 |
18 | ## Props
19 |
20 | :::note
21 | Includes all [Button](button#props) props.
22 | :::
23 |
24 |
25 |
26 | | Name | Type | Default | Description |
27 | | ------ | -------------------- | ------- | --------------- |
28 | | `type` | `solid` or `outline` | | Type of button. |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/example/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "expo": {
3 | "name": "React Native Elements",
4 | "owner": "rneui",
5 | "slug": "react-native-elements",
6 | "description": "A demo app for React Native Elements UI Library",
7 | "privacy": "public",
8 | "platforms": ["ios", "android", "web"],
9 | "version": "4.0.0",
10 | "orientation": "default",
11 | "primaryColor": "#cccccc",
12 | "icon": "./assets/icons/icon.png",
13 | "splash": {
14 | "image": "./assets/icons/loading.png"
15 | },
16 | "updates": {
17 | "fallbackToCacheTimeout": 0
18 | },
19 | "assetBundlePatterns": ["**/*"],
20 | "ios": {
21 | "supportsTablet": true
22 | },
23 | "userInterfaceStyle": "automatic",
24 | "android": {
25 | "package": "com.rneui"
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/packages/themed/src/config/makeStyles.ts:
--------------------------------------------------------------------------------
1 | import { useMemo } from 'react';
2 | import { StyleSheet } from 'react-native';
3 | import { Colors } from './colors';
4 | import { Theme } from './theme';
5 | import { useTheme } from './ThemeProvider';
6 |
7 | export const makeStyles =
8 | | StyleSheet.NamedStyles, V>(
9 | styles:
10 | | T
11 | | ((
12 | theme: {
13 | colors: Colors;
14 | } & Theme,
15 | props: V
16 | ) => T)
17 | ) =>
18 | (props: V = {} as any): T => {
19 | const { theme } = useTheme();
20 |
21 | return useMemo(() => {
22 | const css = typeof styles === 'function' ? styles(theme, props) : styles;
23 | return StyleSheet.create(css);
24 | }, [props, theme]);
25 | };
26 |
--------------------------------------------------------------------------------
/website/docs/component_usage/ListItem.Swipeable.mdx:
--------------------------------------------------------------------------------
1 |
2 |
3 | ```js
4 | (
6 |
28 | ```
29 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-1.2.0/divider.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: divider
3 | title: Divider
4 | ---
5 |
6 | Dividers are visual separators of content. Use Divider when you want to make a
7 | distinction between sections of content.
8 |
9 | ## Usage
10 |
11 | ```js
12 | import { Divider } from 'react-native-elements';
13 |
14 | ;
15 | ```
16 |
17 | ---
18 |
19 | ## Props
20 |
21 | > Also receives all
22 | > [View](https://reactnative.dev/docs/view#props) props
23 |
24 | - [`style`](#style)
25 |
26 | ---
27 |
28 | ## Reference
29 |
30 | ### `style`
31 |
32 | Style of the divider
33 |
34 | | Type | Default |
35 | | :----------: | :-----------------------------------: |
36 | | style object | {height: 1, backgroundColor: #e1e8ee} |
37 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-2.3.2/divider.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: divider
3 | title: Divider
4 | ---
5 |
6 | Dividers are visual separators of content. Use Divider when you want to make a
7 | distinction between sections of content.
8 |
9 | ## Usage
10 |
11 | ```js
12 | import { Divider } from 'react-native-elements';
13 |
14 | ;
15 | ```
16 |
17 | ---
18 |
19 | ## Props
20 |
21 | > Also receives all
22 | > [View](https://reactnative.dev/docs/view#props) props
23 |
24 | - [`style`](#style)
25 |
26 | ---
27 |
28 | ## Reference
29 |
30 | ### `style`
31 |
32 | Style of the divider
33 |
34 | | Type | Default |
35 | | :----------: | :-----------------------------------: |
36 | | style object | {height: 1, backgroundColor: #e1e8ee} |
37 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/Dialog.Actions.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_actions
3 | title: Dialog.Actions
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Define Dialog Actions using this component.
13 |
14 | ## Import
15 |
16 | ```tsx
17 | import { Dialog } from "@rneui/themed";
18 | ```
19 |
20 | ## Props
21 |
22 |
23 |
24 | | Name | Type | Default | Description |
25 | | ---------- | --------- | ------- | --------------------------------------------------- |
26 | | `children` | ReactNode | | Add Enclosed components as an action to the dialog. |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/Dialog.Actions.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_actions
3 | title: Dialog.Actions
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Define Dialog Actions using this component.
13 |
14 | ## Import
15 |
16 | ```tsx
17 | import { Dialog } from "@rneui/themed";
18 | ```
19 |
20 | ## Props
21 |
22 |
23 |
24 | | Name | Type | Default | Description |
25 | | ---------- | --------- | ------- | --------------------------------------------------- |
26 | | `children` | ReactNode | | Add Enclosed components as an action to the dialog. |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/Dialog.Actions.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_actions
3 | title: Dialog.Actions
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | Define Dialog Actions using this component.
13 |
14 | ## Import
15 |
16 | ```tsx
17 | import { Dialog } from "@rneui/themed";
18 | ```
19 |
20 | ## Props
21 |
22 |
23 |
24 | | Name | Type | Default | Description |
25 | | ---------- | --------- | ------- | --------------------------------------------------- |
26 | | `children` | ReactNode | | Add Enclosed components as an action to the dialog. |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/packages/themed/src/ListItem/__tests__/ListItem.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ListItem from '..';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 | import { CreateThemeOptions, FullTheme } from '../../config';
5 |
6 | describe('ListItem component', () => {
7 | it('should apply values from theme', () => {
8 | const theme: Partial = {
9 | components: {
10 | ListItemTitle: {
11 | style: {
12 | color: 'red',
13 | },
14 | },
15 | },
16 | };
17 | const { wrapper } = renderWithWrapper(
18 |
19 |
20 | ,
21 | 'listItemTitle',
22 | theme
23 | );
24 |
25 | expect(wrapper.props.style.color).toBe('red');
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | coverage:
2 | status:
3 | project:
4 | default:
5 | target: 78% #overall project/ repo coverage
6 | base:
7 | target: 75%
8 | flags:
9 | - base
10 | themed:
11 | target: 75%
12 | flags:
13 | - themed
14 |
15 | # adding Flags to your `layout` configuration to show up in the PR comment
16 | comment:
17 | require_changes: false
18 |
19 | # New root YAML section = `flags:`
20 | # This is where you would define every flag from your
21 | # uploader, and update when new Flags added
22 |
23 | flags:
24 | base:
25 | paths: #note, accepts globs, not regexes
26 | - packages/base/
27 | carryforward: false
28 | themed:
29 | paths: #note, accepts globs, not regexes
30 | - packages/themed/
31 | carryforward: true
32 |
--------------------------------------------------------------------------------
/packages/base/src/Rating/Rating.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {
3 | Rating as SwipeRating,
4 | SwipeRatingProps as RatingProps,
5 | } from 'react-native-ratings';
6 | import { RneFunctionComponent } from '../helpers';
7 |
8 | export interface SwipeRatingProps extends RatingProps {}
9 |
10 | /** Ratings are used to collect measurable feedback from users.
11 | * Use Rating over an Input where imagery can increase user interaction.
12 | * This component is imported from [react-native-ratings](https://github.com/Monte9/react-native-ratings).
13 | * There are two tyoes of rating - TapRating and SwipeRating.
14 | * This documentation is for Swipe Rating version. */
15 | export const Rating: RneFunctionComponent = () => {
16 | return ;
17 | };
18 |
19 | Rating.displayName = 'Rating';
20 |
--------------------------------------------------------------------------------
/packages/themed/src/Skeleton/__tests__/Skeleton.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Skeleton from '..';
3 | import { StyleSheet } from 'react-native';
4 | import { renderWithWrapper } from '../../../.ci/testHelper';
5 | import { CreateThemeOptions, FullTheme } from '../../config';
6 |
7 | describe('Skelton Component', () => {
8 | it('should apply props from theme', () => {
9 | const theme: Partial = {
10 | components: {
11 | Skeleton: {
12 | circle: true,
13 | },
14 | },
15 | };
16 | const { wrapper } = renderWithWrapper(
17 | ,
18 | 'RNE__Skeleton',
19 | theme
20 | );
21 | expect(StyleSheet.flatten(wrapper.props.style)).toMatchObject({
22 | borderRadius: 50,
23 | });
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.1/component_usage/Switch.mdx:
--------------------------------------------------------------------------------
1 | ```SnackPlayer name=RNE Switch
2 | import React, { useState } from 'react';
3 | import { Switch } from '@rneui/themed';
4 | import { View, Text, StyleSheet } from 'react-native';
5 |
6 | type SwitchComponentProps = {};
7 |
8 | const SwitchComponent: React.FunctionComponent = () => {
9 | const [checked, setChecked] = useState(false);
10 |
11 | const toggleSwitch = () => {
12 | setChecked(!checked);
13 | };
14 |
15 | return (
16 |
17 | setChecked(value)}
20 | />
21 |
22 | );
23 | };
24 |
25 | const styles = StyleSheet.create({
26 | view: {
27 | margin: 10,
28 | },
29 | });
30 |
31 | export default SwitchComponent;
32 | ```
33 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.2/component_usage/Switch.mdx:
--------------------------------------------------------------------------------
1 | ```SnackPlayer name=RNE Switch
2 | import React, { useState } from 'react';
3 | import { Switch } from '@rneui/themed';
4 | import { View, Text, StyleSheet } from 'react-native';
5 |
6 | type SwitchComponentProps = {};
7 |
8 | const SwitchComponent: React.FunctionComponent = () => {
9 | const [checked, setChecked] = useState(false);
10 |
11 | const toggleSwitch = () => {
12 | setChecked(!checked);
13 | };
14 |
15 | return (
16 |
17 | setChecked(value)}
20 | />
21 |
22 | );
23 | };
24 |
25 | const styles = StyleSheet.create({
26 | view: {
27 | margin: 10,
28 | },
29 | });
30 |
31 | export default SwitchComponent;
32 | ```
33 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/component_usage/Switch.mdx:
--------------------------------------------------------------------------------
1 | ```SnackPlayer name=RNE Switch
2 | import React, { useState } from 'react';
3 | import { Switch } from '@rneui/themed';
4 | import { View, Text, StyleSheet } from 'react-native';
5 |
6 | type SwitchComponentProps = {};
7 |
8 | const SwitchComponent: React.FunctionComponent = () => {
9 | const [checked, setChecked] = useState(false);
10 |
11 | const toggleSwitch = () => {
12 | setChecked(!checked);
13 | };
14 |
15 | return (
16 |
17 | setChecked(value)}
20 | />
21 |
22 | );
23 | };
24 |
25 | const styles = StyleSheet.create({
26 | view: {
27 | margin: 10,
28 | },
29 | });
30 |
31 | export default SwitchComponent;
32 | ```
33 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/component_usage/Switch.mdx:
--------------------------------------------------------------------------------
1 | ```SnackPlayer name=RNE Switch
2 | import React, { useState } from 'react';
3 | import { Switch } from '@rneui/themed';
4 | import { View, Text, StyleSheet } from 'react-native';
5 |
6 | type SwitchComponentProps = {};
7 |
8 | const SwitchComponent: React.FunctionComponent = () => {
9 | const [checked, setChecked] = useState(false);
10 |
11 | const toggleSwitch = () => {
12 | setChecked(!checked);
13 | };
14 |
15 | return (
16 |
17 | setChecked(value)}
20 | />
21 |
22 | );
23 | };
24 |
25 | const styles = StyleSheet.create({
26 | view: {
27 | margin: 10,
28 | },
29 | });
30 |
31 | export default SwitchComponent;
32 | ```
33 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/component_usage/Switch.mdx:
--------------------------------------------------------------------------------
1 | ```SnackPlayer name=RNE Switch
2 | import React, { useState } from 'react';
3 | import { Switch } from '@rneui/themed';
4 | import { View, Text, StyleSheet } from 'react-native';
5 |
6 | type SwitchComponentProps = {};
7 |
8 | const SwitchComponent: React.FunctionComponent = () => {
9 | const [checked, setChecked] = useState(false);
10 |
11 | const toggleSwitch = () => {
12 | setChecked(!checked);
13 | };
14 |
15 | return (
16 |
17 | setChecked(value)}
20 | />
21 |
22 | );
23 | };
24 |
25 | const styles = StyleSheet.create({
26 | view: {
27 | margin: 10,
28 | },
29 | });
30 |
31 | export default SwitchComponent;
32 | ```
33 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/component_usage/Switch.mdx:
--------------------------------------------------------------------------------
1 | ```SnackPlayer name=RNE Switch
2 | import React, { useState } from 'react';
3 | import { Switch } from '@rneui/themed';
4 | import { View, Text, StyleSheet } from 'react-native';
5 |
6 | type SwitchComponentProps = {};
7 |
8 | const SwitchComponent: React.FunctionComponent = () => {
9 | const [checked, setChecked] = useState(false);
10 |
11 | const toggleSwitch = () => {
12 | setChecked(!checked);
13 | };
14 |
15 | return (
16 |
17 | setChecked(value)}
20 | />
21 |
22 | );
23 | };
24 |
25 | const styles = StyleSheet.create({
26 | view: {
27 | margin: 10,
28 | },
29 | });
30 |
31 | export default SwitchComponent;
32 | ```
33 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.7/component_usage/Switch.mdx:
--------------------------------------------------------------------------------
1 | ```SnackPlayer name=RNE Switch
2 | import React, { useState } from 'react';
3 | import { Switch } from '@rneui/themed';
4 | import { View, Text, StyleSheet } from 'react-native';
5 |
6 | type SwitchComponentProps = {};
7 |
8 | const SwitchComponent: React.FunctionComponent = () => {
9 | const [checked, setChecked] = useState(false);
10 |
11 | const toggleSwitch = () => {
12 | setChecked(!checked);
13 | };
14 |
15 | return (
16 |
17 | setChecked(value)}
20 | />
21 |
22 | );
23 | };
24 |
25 | const styles = StyleSheet.create({
26 | view: {
27 | margin: 10,
28 | },
29 | });
30 |
31 | export default SwitchComponent;
32 | ```
33 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/ListItem.Content.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_content
3 | title: ListItem.Content
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding content to the ListItem.
13 | This, Receives all [View](https://reactnative.dev/docs/view#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
27 |
28 |
29 | | Name | Type | Default | Description |
30 | | ------- | ------- | ------- | ----------- |
31 | | `right` | boolean | | |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/ListItem.Content.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_content
3 | title: ListItem.Content
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding content to the ListItem.
13 | This, Receives all [View](https://reactnative.dev/docs/view#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
27 |
28 |
29 | | Name | Type | Default | Description |
30 | | ------- | ------- | ------- | ----------- |
31 | | `right` | boolean | | |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/ListItem.Content.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_content
3 | title: ListItem.Content
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding content to the ListItem.
13 | This, Receives all [View](https://reactnative.dev/docs/view#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](text#props) props.
25 | :::
26 |
27 |
28 |
29 | | Name | Type | Default | Description |
30 | | ------- | ------- | ------- | ----------- |
31 | | `right` | boolean | | |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.1/component_usage/ListItem.Swipeable.mdx:
--------------------------------------------------------------------------------
1 |
2 |
3 | ```js
4 | (
6 | reset()}
9 | icon={{ name: 'info', color: 'white' }}
10 | buttonStyle={{ minHeight: '100%' }}
11 | />
12 | )}
13 | rightContent={(reset) => (
14 | reset()}
17 | icon={{ name: 'delete', color: 'white' }}
18 | buttonStyle={{ minHeight: '100%', backgroundColor: 'red' }}
19 | />
20 | )}
21 | >
22 |
23 |
24 | Hello Swiper
25 |
26 |
27 |
28 | ```
29 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.1/components/Dialog.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_title
3 | title: Dialog.Title
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | `DialogTitle` allows you to add title to the Dialog.
11 |
12 | ## Props
13 |
14 |
15 |
16 | | Name | Type | Default | Description |
17 | | ------------ | ---------- | ------- | ------------------------------------------- |
18 | | `title` | string | | Add Dialog title. |
19 | | `titleProps` | TextProps | | Add additional props for Text component. |
20 | | `titleStyle` | Text Style | | Add additional styling for title component. |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.2/component_usage/ListItem.Swipeable.mdx:
--------------------------------------------------------------------------------
1 |
2 |
3 | ```js
4 | (
6 | reset()}
9 | icon={{ name: 'info', color: 'white' }}
10 | buttonStyle={{ minHeight: '100%' }}
11 | />
12 | )}
13 | rightContent={(reset) => (
14 | reset()}
17 | icon={{ name: 'delete', color: 'white' }}
18 | buttonStyle={{ minHeight: '100%', backgroundColor: 'red' }}
19 | />
20 | )}
21 | >
22 |
23 |
24 | Hello Swiper
25 |
26 |
27 |
28 | ```
29 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.2/components/Dialog.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: dialog_title
3 | title: Dialog.Title
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import {} from "react-native-elements";
9 |
10 | `DialogTitle` allows you to add title to the Dialog.
11 |
12 | ## Props
13 |
14 |
15 |
16 | | Name | Type | Default | Description |
17 | | ------------ | ---------- | ------- | ------------------------------------------- |
18 | | `title` | string | | Add Dialog title. |
19 | | `titleProps` | TextProps | | Add additional props for Text component. |
20 | | `titleStyle` | Text Style | | Add additional styling for title component. |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/component_usage/ListItem.Swipeable.mdx:
--------------------------------------------------------------------------------
1 |
2 |
3 | ```js
4 | (
6 | reset()}
9 | icon={{ name: 'info', color: 'white' }}
10 | buttonStyle={{ minHeight: '100%' }}
11 | />
12 | )}
13 | rightContent={(reset) => (
14 | reset()}
17 | icon={{ name: 'delete', color: 'white' }}
18 | buttonStyle={{ minHeight: '100%', backgroundColor: 'red' }}
19 | />
20 | )}
21 | >
22 |
23 |
24 | Hello Swiper
25 |
26 |
27 |
28 | ```
29 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/component_usage/ListItem.Swipeable.mdx:
--------------------------------------------------------------------------------
1 |
2 |
3 | ```js
4 | (
6 | reset()}
9 | icon={{ name: 'info', color: 'white' }}
10 | buttonStyle={{ minHeight: '100%' }}
11 | />
12 | )}
13 | rightContent={(reset) => (
14 | reset()}
17 | icon={{ name: 'delete', color: 'white' }}
18 | buttonStyle={{ minHeight: '100%', backgroundColor: 'red' }}
19 | />
20 | )}
21 | >
22 |
23 |
24 | Hello Swiper
25 |
26 |
27 |
28 | ```
29 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/ListItem.Subtitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_subtitle
3 | title: ListItem.Subtitle
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding SubTitle to the ListItem.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
25 | :::
26 |
27 |
28 |
29 | | Name | Type | Default | Description |
30 | | ------- | ------- | ------- | ----------- |
31 | | `right` | boolean | | |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.4/components/ListItem.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_title
3 | title: ListItem.Title
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding Title to the ListItem.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
25 | :::
26 |
27 |
28 |
29 | | Name | Type | Default | Description |
30 | | ------- | ------- | ------- | ---------------- |
31 | | `right` | boolean | | Add right title. |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/component_usage/ListItem.Swipeable.mdx:
--------------------------------------------------------------------------------
1 |
2 |
3 | ```js
4 | (
6 | reset()}
9 | icon={{ name: 'info', color: 'white' }}
10 | buttonStyle={{ minHeight: '100%' }}
11 | />
12 | )}
13 | rightContent={(reset) => (
14 | reset()}
17 | icon={{ name: 'delete', color: 'white' }}
18 | buttonStyle={{ minHeight: '100%', backgroundColor: 'red' }}
19 | />
20 | )}
21 | >
22 |
23 |
24 | Hello Swiper
25 |
26 |
27 |
28 | ```
29 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/ListItem.Subtitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_subtitle
3 | title: ListItem.Subtitle
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding SubTitle to the ListItem.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
25 | :::
26 |
27 |
28 |
29 | | Name | Type | Default | Description |
30 | | ------- | ------- | ------- | ----------- |
31 | | `right` | boolean | | |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.5/components/ListItem.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_title
3 | title: ListItem.Title
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding Title to the ListItem.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
25 | :::
26 |
27 |
28 |
29 | | Name | Type | Default | Description |
30 | | ------- | ------- | ------- | ---------------- |
31 | | `right` | boolean | | Add right title. |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/component_usage/ListItem.Swipeable.mdx:
--------------------------------------------------------------------------------
1 |
2 |
3 | ```js
4 | (
6 | reset()}
9 | icon={{ name: 'info', color: 'white' }}
10 | buttonStyle={{ minHeight: '100%' }}
11 | />
12 | )}
13 | rightContent={(reset) => (
14 | reset()}
17 | icon={{ name: 'delete', color: 'white' }}
18 | buttonStyle={{ minHeight: '100%', backgroundColor: 'red' }}
19 | />
20 | )}
21 | >
22 |
23 |
24 | Hello Swiper
25 |
26 |
27 |
28 | ```
29 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/ListItem.Subtitle.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_subtitle
3 | title: ListItem.Subtitle
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding SubTitle to the ListItem.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
25 | :::
26 |
27 |
28 |
29 | | Name | Type | Default | Description |
30 | | ------- | ------- | ------- | ----------- |
31 | | `right` | boolean | | |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.6/components/ListItem.Title.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: listitem_title
3 | title: ListItem.Title
4 | ---
5 |
6 | import { IconsStyle } from "@site/src/components/Docs_Icons";
7 | import Tabs from "@theme/Tabs";
8 | import TabItem from "@theme/TabItem";
9 |
10 |
11 |
12 | This allows adding Title to the ListItem.
13 | This, Receives all [Text](text#props) props.
14 |
15 | ## Import
16 |
17 | ```tsx
18 | import { ListItem } from "@rneui/themed";
19 | ```
20 |
21 | ## Props
22 |
23 | :::note
24 | Includes all [Text](https://reactnative.dev/docs/text#props) props.
25 | :::
26 |
27 |
28 |
29 | | Name | Type | Default | Description |
30 | | ------- | ------- | ------- | ---------------- |
31 | | `right` | boolean | | Add right title. |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.7/component_usage/ListItem.Swipeable.mdx:
--------------------------------------------------------------------------------
1 |
2 |
3 | ```js
4 | (
6 | reset()}
9 | icon={{ name: 'info', color: 'white' }}
10 | buttonStyle={{ minHeight: '100%' }}
11 | />
12 | )}
13 | rightContent={(reset) => (
14 | reset()}
17 | icon={{ name: 'delete', color: 'white' }}
18 | buttonStyle={{ minHeight: '100%', backgroundColor: 'red' }}
19 | />
20 | )}
21 | >
22 |
23 |
24 | Hello Swiper
25 |
26 |
27 |
28 | ```
29 |
--------------------------------------------------------------------------------
/example/src/views/login/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StyleSheet, View, ScrollView } from 'react-native';
3 | import { Header } from '../../components/header';
4 | import LoginScreen2 from './screen2';
5 | import LoginScreen3 from './screen3';
6 |
7 | type LoginComponentProps = {};
8 |
9 | const Login: React.FunctionComponent = () => {
10 | return (
11 | <>
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | >
20 | );
21 | };
22 |
23 | const styles = StyleSheet.create({
24 | container: {
25 | flex: 1,
26 | backgroundColor: 'black',
27 | position: 'relative',
28 | },
29 | });
30 |
31 | export default Login;
32 |
--------------------------------------------------------------------------------
/packages/themed/src/LinearProgress/__tests__/LinearProgress.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import LinearProgress from '../index';
3 | import { renderWithWrapper } from '../../../.ci/testHelper';
4 | import { CreateThemeOptions, FullTheme } from '../../config';
5 |
6 | describe('LinearProgress Component', () => {
7 | it('should apply props from theme', () => {
8 | const theme: Partial = {
9 | components: {
10 | LinearProgress: {
11 | color: 'rgb(255, 0, 0)',
12 | },
13 | },
14 | };
15 | const { wrapper } = renderWithWrapper(
16 | ,
17 | 'RNE__LinearProgress_Progress',
18 | theme
19 | );
20 | expect(wrapper.props.style).toMatchObject({
21 | backgroundColor: 'rgb(255, 0, 0)',
22 | });
23 | });
24 | });
25 |
--------------------------------------------------------------------------------
/website/versioned_docs/version-4.0.0-rc.3/components/Chip.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | id: chip
3 | title: Chip
4 | ---
5 |
6 | import Tabs from "@theme/Tabs";
7 | import TabItem from "@theme/TabItem";
8 | import Usage from "../component_usage/Chip.mdx";
9 |
10 | Chips are compact elements that represent an input, attribute, or action.
11 | They may display text, icons, or both.
12 |
13 | ## Import
14 |
15 | ```tsx
16 | import { Chip } from "@rneui/themed";
17 | ```
18 |
19 | ## Usage
20 |
21 |
22 |
23 | ## Props
24 |
25 | :::note
26 | Includes all [Button](button#props) props.
27 | :::
28 |
29 |
30 |
31 | | Name | Type | Default | Description |
32 | | ------ | -------------------- | ------- | --------------- |
33 | | `type` | `solid` or `outline` | | Type of button. |
34 |
35 |
36 |
--------------------------------------------------------------------------------