Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/doc improvements #414

Open
wants to merge 55 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4a17967
changes width color in tabs component
Nov 10, 2022
73b5b78
change color of text in tabs component
Nov 11, 2022
9e9021b
remove modal and content in navbar
Nov 15, 2022
4f06bfb
remove modal
Nov 15, 2022
21aed4e
fix: code block design for bash
ankit-tailor Nov 15, 2022
c9e3c4c
fix: design changes
ankit-tailor Nov 15, 2022
b210e22
fix: remove shadow
ankit-tailor Nov 15, 2022
dbd57f3
fix: bash for code block
ankit-tailor Nov 15, 2022
2109c21
fix: add hover effect
ankit-tailor Nov 15, 2022
3248aae
fix: kitchen sink frame size
ankit-tailor Nov 15, 2022
622539c
Merge pull request #406 from GeekyAnts/fix/tabs-style-changes
ankit-tailor Nov 15, 2022
1c5155f
Merge pull request #407 from GeekyAnts/fix/navbar-content-changes
ankit-tailor Nov 15, 2022
32750e6
fix: design installation page in expo component
ruchik02 Nov 16, 2022
086ddb6
fix design for installation page in next
Nov 16, 2022
ccddbdc
fix: design installation page in create react component
ruchik02 Nov 16, 2022
b460e02
fix design for installation page in next
Nov 16, 2022
65394dc
fix design for installation page in react native
Nov 16, 2022
d8ba221
fix design for installation page in react native
Nov 16, 2022
6bf875a
fix design for installation page in next
Nov 16, 2022
c2e0e4e
change design in installation page(react native)
Nov 17, 2022
d2e82ef
fix: sidebar accessibility
ankit-tailor Nov 17, 2022
3dba5b5
fix: tab design
ankit-tailor Nov 17, 2022
c0ebb1e
fix: add hover effect
ankit-tailor Nov 17, 2022
7dbda50
fix: editor line height
ankit-tailor Nov 17, 2022
e4a5767
Merge branch 'fix/doc-improvements' of github.com:GeekyAnts/nativebas…
ruchik02 Nov 17, 2022
9aa62ba
change design in installation page(react native)
Nov 17, 2022
53ef978
Merge branch 'fix/doc-improvements' of github.com:GeekyAnts/nativebas…
Nov 17, 2022
ce5f445
fix: add content in place lorem ispsum
ruchik02 Nov 17, 2022
e076f11
change design in installation page(react native)
Nov 17, 2022
3a65441
Merge branch 'fix/doc-improvements' of github.com:GeekyAnts/nativebas…
Nov 17, 2022
062a9ee
fix: add content in place of lorem ispsum
ruchik02 Nov 17, 2022
ea55c6e
fix: expo docs
ankit-tailor Nov 17, 2022
f255c2b
fix: add bash style prop
ankit-tailor Nov 17, 2022
8efe68b
change design in installation page(next.js)
Nov 17, 2022
0b4e7f4
fix: add bashstyles in all files
ruchik02 Nov 17, 2022
00f3bc7
change design in installation page(react native)
Nov 17, 2022
3fa3cd1
fix: setup provider doc improvements
ankit-tailor Nov 18, 2022
d566a00
fix: add bashestyled in all files
ruchik02 Nov 18, 2022
b01531a
change design in installation page(next)
Nov 18, 2022
c674592
fix: add isSSR
ankit-tailor Nov 18, 2022
0ed2fd6
fix: next existing heading
ankit-tailor Nov 18, 2022
82d2f9a
fix: styles changes in expo components
ruchik02 Nov 18, 2022
2d99a5c
Merge pull request #411 from GeekyAnts/fix/doc-next-improvements
ankit-tailor Nov 18, 2022
b5153c5
fix: expo link
ankit-tailor Nov 18, 2022
015eca5
Merge pull request #409 from GeekyAnts/fix/expo-installation-docs-imp…
ankit-tailor Nov 18, 2022
c283599
Merge branch 'fix/doc-improvements' of github.com:GeekyAnts/nativebas…
ankit-tailor Nov 18, 2022
200941f
fix: link
ankit-tailor Nov 18, 2022
1306be4
Merge pull request #410 from GeekyAnts/fix/create-react-app-installat…
ankit-tailor Nov 18, 2022
f6323a4
Merge branch 'fix/doc-improvements' of github.com:GeekyAnts/nativebas…
ankit-tailor Nov 18, 2022
1028c2c
fix: description
ankit-tailor Nov 18, 2022
6d0bac0
fix: link
ankit-tailor Nov 18, 2022
3108e5b
Merge pull request #412 from GeekyAnts/fix/doc-rn-improvements
ankit-tailor Nov 18, 2022
1cb21f6
fix: tab color light mode
ankit-tailor Nov 18, 2022
ae982d4
fix: linear gradient link
ankit-tailor Nov 18, 2022
e7aa150
Merge pull request #413 from GeekyAnts/fix/doc-imporvements-setup-pro…
ankit-tailor Nov 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 151 additions & 33 deletions docs/3.0.x/install-cra.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,75 +11,199 @@ import { TileLink } from "../../src/components";
{ label: 'New Project', value: 'template' },
{ label: 'Existing Project', value: 'cli' }
]}>

<DocTabItem value="template">

The easiest way to get started with NativeBase in create react app is using NativeBase template.
<Box mt="3" />

#### The easiest way to get started with NativeBase in create react app is using NativeBase template.

### JavaScript
<Text
_dark={{ color: "coolGray.300" }}
_light={{ color: "coolGray.800" }}
fontWeight="medium"
>
NativeBase can be used in your web project just like mobile. This is possible using react-native-web. You can follow the below steps to install NativeBase template using create-react-app.
</Text>
<br/>
<Box>
<Box
_dark={{ bg: "#171E2E" }}
_light={{ bg: "coolGray.50" }}
rounded='lg'
py="3"
px="4"
pb='4'
rounded="md"
mb='8'
>
<Text bold mb="2" fontSize="md">
Using npx
</Text>
<Text
_dark={{ color: "coolGray.300" }}
_light={{ color: "coolGray.800" }}
>
Choose your preferred template and start your development swiftly.
Open a Terminal in your project's folder and run the following one of these command:
</Text>
<br/>
<Text
_dark={{ color: "coolGray.300" }}
_light={{ color: "coolGray.800" }}
fontWeight="bold"
>
Plain Javascript
</Text>

```bash
npx create-react-app my-app --template nativebase
cd my-app/
yarn start
```

### TypeScript
<Text fontSize="sm" lineHeight="sm">
Yey! you are all set, start editing src/pages/index.js now.
</Text>
<br />
<Text
mt="0.5"
_dark={{ color: "coolGray.300" }}
_light={{ color: "coolGray.800" }}
fontWeight="bold"
>
With Typescript
</Text>

```bash
npx create-react-app my-app --template nativebase-typescript
cd my-app/
yarn start
```

<Text fontSize="sm" lineHeight="sm">
Yey! you are all set, start editing src/pages/index.tsx now.
</Text>
</Box>
</Box>

</DocTabItem>

<DocTabItem value="cli">

Create a new CRA project If not exist
<Box mt="3" />

```bash
#### Create a new CRA project If not exist

<Text
_dark={{ color: "coolGray.300" }}
_light={{ color: "coolGray.800" }}
fontWeight="medium"
>
To create a new react project run the following command:
</Text>

```bash isBashStyled=false
npx create-react-app my-app
cd my-app
```

[Refer this guide](https://necolas.github.io/react-native-web/docs/installation/) if you need additional configurations.

### Install dependencies

<DocTabs
defaultValue='yarn'
values={[
{ label: 'yarn', value: 'yarn' },
{ label: 'npm', value: 'npm' }
]}>

<DocTabItem value="yarn">

<Box maxWidth="750px">
<HStack mb='4'>
<Pressable>
{({ isHovered }) => {
return (
<Link
_text={{
_light: {
color: "cyan.600",
},
_dark: {
color: "cyan.500",
},
textDecorationLine: isHovered ? "underline" : "none",
fontWeight: 'medium'
}}
href={"https://necolas.github.io/react-native-web/docs/installation/"}
>
Refer this link {" "}
</Link>
);
}}
</Pressable>
<Text _dark={{ color: "coolGray.300" }} _light={{ color: "coolGray.800" }}>if you need additional configurations.</Text>
</HStack>

#### Install dependencies

<Text _dark={{ color: "coolGray.300" }} _light={{ color: "coolGray.800" }}>
You can install the package and its peer dependencies using the package
manager of your choice.
</Text>
<br />

<Box
_dark={{ bg: "#171E2E" }}
_light={{ bg: "coolGray.50" }}
rounded='lg'
py="3"
px="4"
pb='4'
rounded="md"
mb='8'
>
<Text bold mb="2" fontSize="md" >
Using yarn
</Text>
<Text
_dark={{ color: "coolGray.300" }}
_light={{ color: "coolGray.800" }}
>
Open a Terminal in your project's folder and run:
</Text>

```bash
yarn add [email protected] native-base [email protected] styled-components styled-system [email protected]
```

</Box>
</DocTabItem>

<DocTabItem value="npm">
<Box maxWidth="750px">
<Box
_dark={{ bg: "#171E2E" }}
_light={{ bg: "coolGray.50" }}
rounded='lg'
py="3"
px="4"
pb='4'
rounded="md"
mb='8'
>
<Text bold mb="2" fontSize="md" >
Using npm
</Text>
<Text
_dark={{ color: "coolGray.300" }}
_light={{ color: "coolGray.800" }}
>
Open a Terminal in your project's folder and run:
</Text>

```bash

npm install [email protected] native-base [email protected] styled-components styled-system [email protected]
```

</Box>
</DocTabItem>

</DocTabs>
<Box mt="3" />

### Run the Hello world example
#### Run the Hello world example

Put the below code in your App.js
<Text
_dark={{ color: "coolGray.300" }}
_light={{ color: "coolGray.800" }}
fontWeight="medium"
>
Put the below code in your App.js
</Text>

```jsx
import React from "react";
Expand All @@ -97,12 +221,6 @@ function App() {
</DocTabItem>

</DocTabs>

<Center>
<AspectRatio ratio={2.21} w="100%" maxW="500">
<Image source={{ uri: "/img/minion.gif" }} alt="minions clapping" />
</AspectRatio>
</Center>

<Box>
<Box mt="4" mb="8">
Expand Down
Loading