Skip to content

Commit 500cfba

Browse files
authored
Merge pull request #322 from GeekyAnts/staging
Update -> promote staging to production
2 parents 2640552 + c77b373 commit 500cfba

File tree

126 files changed

+1545
-1357
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+1545
-1357
lines changed

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/docs/3.4.x/color-mode.md
2+
/docs/next/color-mode.md
3+
/docs/3.4.x/dark-mode.md
4+
/docs/next/dark-mode.md

docs.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
"3.1.x": "3.1.0",
1111
"3.2.x": "3.2.2",
1212
"3.3.x": "3.3.10",
13-
"3.4.x": "3.4.0-rc.1",
13+
"3.4.x": "3.4.11",
1414
},
1515
componentOfTheWeek: {
1616
switch: "https://www.youtube.com/embed/VGUhi8IQHDw",

docs/3.0.x/action-sheet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ NativeBase exports 3 modal-related components:
1616
- **Actionsheet.Item**: A button to wrap the options of the Actionsheet.
1717

1818
```jsx
19-
import { Actionsheet } from 'native-base';
19+
import { Actionsheet } from "native-base";
2020
```
2121

2222
## Examples
@@ -61,7 +61,7 @@ import { Actionsheet } from 'native-base';
6161

6262
### Actionsheet.Item
6363

64-
ActionsheetItem implements [Button](button#props)
64+
ActionsheetItem implements [Button](button#h2-props)
6565

6666
## Styling
6767

docs/3.0.x/alert-dialog.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ import { ComponentTheme } from '../../src/components';
1717
- `AlertDialog.CloseButton`: The button that closes the dialog.
1818

1919
```jsx
20-
import { AlertDialog } from 'native-base';
20+
import { AlertDialog } from "native-base";
2121
```
2222

2323
## Examples
2424

2525
### Basic
2626

2727
```jsx isLive=true
28-
import React from 'react';
29-
import { AlertDialog, Button, Center, NativeBaseProvider } from 'native-base';
28+
import React from "react";
29+
import { AlertDialog, Button, Center, NativeBaseProvider } from "native-base";
3030

3131
function AlertDialogComponent() {
3232
const [isOpen, setIsOpen] = React.useState(false);
@@ -38,7 +38,7 @@ function AlertDialogComponent() {
3838
leastDestructiveRef={cancelRef}
3939
isOpen={isOpen}
4040
onClose={onClose}
41-
motionPreset={'fade'}
41+
motionPreset={"fade"}
4242
>
4343
<AlertDialog.Content>
4444
<AlertDialog.Header fontSize="lg" fontWeight="bold">
@@ -75,8 +75,8 @@ export function Example() {
7575
### Transition
7676
7777
```jsx isLive=true
78-
import React from 'react';
79-
import { AlertDialog, Button, Center, NativeBaseProvider } from 'native-base';
78+
import React from "react";
79+
import { AlertDialog, Button, Center, NativeBaseProvider } from "native-base";
8080
8181
function AlertDialogComponent() {
8282
const [isOpen, setIsOpen] = React.useState(false);
@@ -127,7 +127,7 @@ export function Example() {
127127
128128
## Props
129129
130-
AlertDialog and its components compose the **[Modal](/modal)** component, so all the [`Modal props`](/modal#props) can be passed to it. The only exception is that it requires `leastDestructiveRef` which is similar to `initialFocusRef` of `Modal`.
130+
AlertDialog and its components compose the **[Modal](/modal)** component, so all the [`Modal props`](/modal#h2-props) can be passed to it. The only exception is that it requires `leastDestructiveRef` which is similar to `initialFocusRef` of `Modal`.
131131
132132
| Name | Type | Description | Default |
133133
| ------------------- | --------- | -------------------------------------------------------------- | ------- |

docs/3.0.x/kitchen-sink.mdx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import { KitchenSinkIframe, TileLink, NBHistory } from "../../src/components";
88
<Box>
99
<Box m="0">
1010
<Box p="0" mb="12">
11-
<Box>
11+
<Box
12+
_text={{ fontSize: "md" }}
13+
_dark={{ _text: { color: "coolGray.400" } }}
14+
_light={{ _text: { color: "coolGray.700" } }}
15+
>
1216
Kitchen Sink is a comprehensive demo app showcasing all the NativeBase
1317
components in action. It includes buttons, forms, icons and much more!
1418
</Box>
@@ -20,9 +24,18 @@ import { KitchenSinkIframe, TileLink, NBHistory } from "../../src/components";
2024
direction={{ base: "column", md: "row" }}
2125
>
2226
<Box w={{ base: "100%", md: "75%" }}>
23-
<Text>
27+
<Text
28+
fontSize="md"
29+
_dark={{ color: "coolGray.400" }}
30+
_light={{ color: "coolGray.700" }}
31+
>
2432
<Text>Scan with the </Text>
25-
<Image alt="expo icon" mb="-1" size="5" source={{ uri: "/img/expo-icon.svg" }} />
33+
<Image
34+
alt="expo icon"
35+
mb="-1"
36+
size="5"
37+
source={{ uri: "/img/expo-icon.svg" }}
38+
/>
2639
<Text>
2740
{" "}
2841
Expo app on your Android device to see the special dish we cooked for

docs/3.0.x/migration/action-sheet.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We have sliced [`Actionsheet`](/action-sheet) into multiple smaller component wh
1010
Migrating Checkbox components can broadly described in these points:
1111

1212
- **options** (prop) → `Actionsheet.Item` (component).
13-
- Props like **cancelButtonIndex**, **cancelButtonIndex** are _no longer required_ as components like `Actionsheet.Item` can be customised as per need.
13+
- Props like **cancelButtonIndex** are _no longer required_ as components like `Actionsheet.Item` can be customised as per need.
1414
- **title** (prop) → NativeBase components such as `Heading` and `Text` can be used inside `ActionSheet.Content` to show the title.
1515
- Declarative approach to show and hide using `isOpen` prop, instead of `show()` and `hide()`.
1616

@@ -25,16 +25,16 @@ values={[
2525
<DocTabItem value="v2">
2626

2727
```tsx
28-
import React, { Component } from 'react';
28+
import React, { Component } from "react";
2929
import {
3030
Container,
3131
Header,
3232
Button,
3333
Content,
3434
ActionSheet,
3535
Text,
36-
} from 'native-base';
37-
var BUTTONS = ['Option 1', 'Option 2', 'Option 3', 'Delete', 'Cancel'];
36+
} from "native-base";
37+
var BUTTONS = ["Option 1", "Option 2", "Option 3", "Delete", "Cancel"];
3838
var DESTRUCTIVE_INDEX = 3;
3939
var CANCEL_INDEX = 4;
4040
export default class ActionSheetExample extends Component {
@@ -53,7 +53,7 @@ export default class ActionSheetExample extends Component {
5353
options: BUTTONS,
5454
cancelButtonIndex: CANCEL_INDEX,
5555
destructiveButtonIndex: DESTRUCTIVE_INDEX,
56-
title: 'Header',
56+
title: "Header",
5757
},
5858
(buttonIndex) => {
5959
this.setState({ clicked: BUTTONS[buttonIndex] });
@@ -74,8 +74,8 @@ export default class ActionSheetExample extends Component {
7474
<DocTabItem value="v3">
7575

7676
```tsx
77-
import React from 'react';
78-
import { Button, Actionsheet, useDisclose } from 'native-base';
77+
import React from "react";
78+
import { Button, Actionsheet, useDisclose } from "native-base";
7979

8080
export default function () {
8181
const { isOpen, onOpen, onClose } = useDisclose();

docs/3.0.x/migration/button.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Migrating Button components can broadly described in these points:
1616
- Colors of the Buttons:
1717
In v3 the color is controlled by `colorScheme` prop. So all the color providing props [ **light**, **info**, **success**, **warning**, **danger** and **dark** ] can be passed as value (and more) to `colorScheme` props.
1818
- Design of the Button:
19-
With v3 we're providing some mostly frequently used designs as `variants` [ **solid**, **outline**, **ghost**, **link** and **unstyled** ] and lot more customisation.
19+
With v3 we're providing some most frequently used designs as `variants` [ **solid**, **outline**, **ghost**, **link** and **unstyled** ] and lot more customisation.
2020
- Sizes of the Button:
2121
In v3 the size is controlled by `size` prop. And it accepts pre-defined sizes [ like xs, sm md, lg ] and also custom values.
2222

docs/3.0.x/migration/fab.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Migrating [`FAB`](/fab) to v3 will provide a lot more **design**, **size**, **co
22

33
## Overview
44

5-
Migrating Badge components can broadly described in these points:
5+
Migrating Fab components can broadly described in these points:
66

77
- Instead of Passing Icon as child, use `icon` prop.
88

@@ -17,16 +17,16 @@ values={[
1717
<DocTabItem value="v2">
1818

1919
```tsx
20-
import React, { Component } from 'react';
21-
import { Container, Header, View, Icon, Fab } from 'native-base';
20+
import React, { Component } from "react";
21+
import { Container, Header, View, Icon, Fab } from "native-base";
2222
export default function () {
2323
return (
2424
<Container>
2525
<Header />
2626
<View style={{ flex: 1 }}>
2727
<Fab
2828
direction="up"
29-
style={{ backgroundColor: '#5067FF' }}
29+
style={{ backgroundColor: "#5067FF" }}
3030
position="bottomRight"
3131
>
3232
<Icon name="share" />
@@ -41,8 +41,8 @@ export default function () {
4141
<DocTabItem value="v3">
4242

4343
```tsx
44-
import React from 'react';
45-
import { Fab, Icon } from 'native-base';
44+
import React from "react";
45+
import { Fab, Icon } from "native-base";
4646

4747
export default function () {
4848
return (

docs/3.0.x/select.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Select creates a dropdown list of items with the selected item in closed view.
1212
## Import
1313

1414
```jsx
15-
import { Select } from 'native-base';
15+
import { Select } from "native-base";
1616
```
1717

1818
## Examples
@@ -50,19 +50,19 @@ import { Select } from 'native-base';
5050
| -------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ---------- |
5151
| variant | `native`, `styled` | The variant of the select style to use. | `native` |
5252
| placeholder | string | The placeholder attribute specifies a short hint that describes the expected value of a selected field (only for styled variant). | - |
53-
| \_placeholder | [`TextProps`](text.md#props) | Text props to be applied to placeholder (only for styled variant). | - |
53+
| \_placeholder | [`TextProps`](text.md#h2-props) | Text props to be applied to placeholder (only for styled variant). | - |
5454
| selectedValue | string | The default value which is selected. | - |
5555
| onValueChange | function | Callback for on change on the input value. | - |
5656
| selectedItemBg | string | Background color for the selected item (only for styled variant). | `blue.500` |
57-
| \_selectedItem | [`TextProps`](text.md#props) | Text prop for selected item (only for styled variant). | - |
57+
| \_selectedItem | [`TextProps`](text.md#h2-props) | Text prop for selected item (only for styled variant). | - |
5858
| isDisabled | boolean | If true, the button will be disabled (not supported on ios for native variant). | - |
5959
| dropdownIcon | JSX.Element | If given, updates the dropdown Icon (only for styled variant). | - |
6060
| dropdownOpenIcon | JSX.Element | If given, updates the dropdown Icon when opened (only for styled variant). | - |
6161
| dropdownCloseIcon | JSX.Element | If given, updates the dropdown Icon when closed (only for styled variant). | - |
6262
| \_ios | _StyleProps_ | Props which you only want to pass to ios device. | - |
6363
| \_android | _StyleProps_ | Props which you only want to pass to android device. | - |
6464
| \_web | _StyleProps_ | Props which you only want to pass to web device. | - |
65-
| \_item | [`TextProps`](text.md#props) | TextProps to be applied to the label (only for styled variant). | - |
65+
| \_item | [`TextProps`](text.md#h2-props) | TextProps to be applied to the label (only for styled variant). | - |
6666
| androidMode <AndroidBadge/> | `dialog`, `dropdown` | On Android, specifies how to display the selection items when the user taps on the picker (only for native variant). | `dialog` |
6767
| androidIconColor <AndroidBadge/> | string | On Android, specifies color of dropdown triangle. Input value can any color from theme like `default.300` (only for native variant). | - |
6868
| androidPrompt <AndroidBadge/> | string | On Android, prompt string for this picker, used on Android in dialog mode as the title of the dialog (only for native variant). | - |
@@ -76,7 +76,7 @@ import { Select } from 'native-base';
7676
| label | string | The label which will be displayed. | - |
7777
| value | string | The value to be used for the item. This is the value that will be returned on form submission. | - |
7878
| isDisabled | boolean | If true, the item will be disabled (only for `styled` variant). | - |
79-
| \_label | [`TextProps`](text.md#props) | TextProps to be applied to label (only for `styled` variant). | - | -->
79+
| \_label | [`TextProps`](text.md#h2-props) | TextProps to be applied to label (only for `styled` variant). | - | -->
8080

8181
## Styling
8282

docs/3.0.x/tooltip.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A tooltip is a brief, informative message that appears when a user interacts wit
1010
## Import
1111

1212
```jsx
13-
import { Tooltip } from 'native-base';
13+
import { Tooltip } from "native-base";
1414
```
1515

1616
## Examples
@@ -29,7 +29,7 @@ import { Tooltip } from 'native-base';
2929

3030
### Customizing tooltip
3131

32-
Tooltip is a wrapper around [Box](box.md). So, it also accepts all the [Box](box.md#props) props.
32+
Tooltip is a wrapper around [Box](box.md). So, it also accepts all the [Box](box.md#h2-props) props.
3333

3434
```ComponentSnackPlayer path=composites,Tooltip,CustomTooltip.tsx
3535

0 commit comments

Comments
 (0)