-
Notifications
You must be signed in to change notification settings - Fork 949
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into docs/overview-examples
- Loading branch information
Showing
113 changed files
with
7,313 additions
and
2,443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Add into existing project | ||
|
||
If you already have an existing code base, you're able to give UI Kitten a try as simple as `npm install`. Please refer to [Start a new App Guide](guides/start-a-new-app) if you don't have any code yet. | ||
|
||
<hr> | ||
|
||
## Install UI Kitten and Eva Design System | ||
|
||
```bash | ||
npm i react-native-ui-kitten @eva-design/eva | ||
``` | ||
|
||
<hr> | ||
|
||
## Configure Application Root | ||
|
||
At this step you have everything in place, let's configure UI Kitten to be used in your app. | ||
In your **App.js**: | ||
|
||
```js | ||
import React from 'react'; | ||
import { mapping, light as lightTheme } from '@eva-design/eva'; | ||
import { ApplicationProvider } from 'react-native-ui-kitten'; | ||
import { RootComponent } from '../path-to/root.component'; // <-- Import your application entry point | ||
|
||
const App = () => ( | ||
<ApplicationProvider | ||
mapping={mapping} | ||
theme={lightTheme}> | ||
<RootComponent /> | ||
</ApplicationProvider> | ||
); | ||
|
||
export default App; | ||
``` | ||
|
||
That's it. UI Kitten is ready now. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Starting a new App | ||
|
||
If you don't have any code yet, please consider checking <a href="https://facebook.github.io/react-native/docs/getting-started" target="_blank">React Native Getting Started</a> documentation for help creating your app. | ||
|
||
<hr> | ||
|
||
## Installation | ||
|
||
First of all, you should have React Native CLI installed. | ||
|
||
```bash | ||
npm i -g react-native-cli | ||
``` | ||
|
||
<hr> | ||
|
||
## Create a New Project | ||
|
||
A new project can be created using React Native CLI tools ant UI Kitten template. | ||
|
||
```bash | ||
react-native init --template ui-kitten | ||
``` | ||
|
||
Or, if you want to init with TypeScript: | ||
```bash | ||
react-native init --template ui-kitten-typescript | ||
``` | ||
|
||
That's it. UI Kitten is ready now. For the next steps, simply follow command line instructions. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Setup Icons Module | ||
|
||
Starting from UI Kitten 4.2, we introduce an icons module built on top of <a href="https://akveo.github.io/eva-icons" target="_blank">Eva Icons</a>. Eva Icons is a pack of beautifully crafted Open Source icons for common actions and items. | ||
|
||
<div class="note note-info"> | ||
<div class="note-title">IMPORTANT</div> | ||
<div class="note-body"> | ||
This tutorial assumes you have everything in place and [ApplicationProvider is configured](guides/install-ui-kitten). | ||
</div> | ||
</div> | ||
|
||
<hr> | ||
|
||
## Installation | ||
|
||
First, ensure that `react-native-svg` library is installed: **<a href="https://github.com/react-native-community/react-native-svg#installation" target="_blank">install react-native-svg</a>**. | ||
|
||
Add `@ui-kitten/eva-icons` to project dependencies. | ||
|
||
```bash | ||
npm i @ui-kitten/eva-icons | ||
``` | ||
|
||
<hr> | ||
|
||
## Configure Icon Registry | ||
|
||
```js | ||
import * as React from 'react'; | ||
import { mapping, light as lightTheme } from '@eva-design/eva'; | ||
import { EvaIconsPack } from '@ui-kitten/eva-icons'; | ||
import { ApplicationProvider, Layout, IconRegistry } from 'react-native-ui-kitten'; | ||
|
||
const App = () => ( | ||
<ApplicationProvider | ||
mapping={mapping} | ||
theme={lightTheme}> | ||
<IconRegistry icons={EvaIconsPack}/> | ||
<Layout style={{flex: 1}}/> | ||
</ApplicationProvider> | ||
); | ||
|
||
export default App; | ||
``` | ||
|
||
<hr> | ||
|
||
## Use it with UI Kitten components | ||
|
||
```js | ||
import * as React from 'react'; | ||
import { Button, Icon } from 'react-native-ui-kitten'; | ||
|
||
export const FacebookIcon = (style) => ( | ||
<Icon name='facebook' {...style} /> | ||
); | ||
|
||
export const LoginButton = () => ( | ||
<Button icon={FacebookIcon}>Login with Facebook</Button> | ||
); | ||
``` | ||
|
||
That's it. UI Kitten with Eva Icons is ready now. | ||
|
||
As a result, you should have a Button looking similar to this: | ||
|
||
![image](assets/images/articles/guides/sample-icon-button.png) |
Oops, something went wrong.