Skip to content

Commit

Permalink
feat(template): add ui-kitten template projects
Browse files Browse the repository at this point in the history
  • Loading branch information
artyorsh committed Aug 19, 2019
1 parent 14bf854 commit 0a3ec77
Show file tree
Hide file tree
Showing 21 changed files with 1,465 additions and 1,153 deletions.
28 changes: 5 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,14 @@ There is a huge variety of customizable layouts, use “as is” or add new bloc

## Quick Start

Install UI Kitten and Eva Design System packages via npm:
Start a new app with UI Kitten template from a scratch:

```bash
npm i react-native-ui-kitten @eva-design/eva
react-native init --template ui-kitten
```

Modify your application root:

```jsx
import React from 'react';
import { mapping, light as lightTheme } from '@eva-design/eva';
import { ApplicationProvider, Layout } from 'react-native-ui-kitten';

const App = () => (
<ApplicationProvider
mapping={mapping}
theme={lightTheme}>
<Layout style={{flex: 1}}/>
</ApplicationProvider>
);

export default App;
```

The code above will configure your application component to apply Eva Design System styling magic.
Read the [Design System guide][link:doc-theme-system] for more details.
This will setup a new React Native application configured with UI Kitten.
Refer to the [Documentation][link:doc-where-start] for more options to start.

## How can I support the developers?
- Star our GitHub repo :star:
Expand All @@ -83,7 +65,7 @@ We're always happy to receive your feedback!
[link:travis]: https://travis-ci.com/akveo/react-native-ui-kitten
[link:coveralls]: https://coveralls.io/github/akveo/react-native-ui-kitten?branch=master
[link:doc-homepage]: https://akveo.github.io/react-native-ui-kitten
[link:doc-theme-system]: https://akveo.github.io/react-native-ui-kitten/docs/design-system/eva-design-system-intro
[link:doc-where-start]: https://akveo.github.io/react-native-ui-kitten/docs/getting-started/where-to-start
[link:kitten-tricks]: https://github.com/akveo/kittenTricks
[link:eva-icons]: https://github.com/akveo/eva-icons
[link:akveo-homepage]: https://akveo.com
Expand Down
7 changes: 5 additions & 2 deletions docs/src/articles/getting-started/where-to-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ UI Kitten is a framework of UI components powered by Eva Design System for your

## Quick start tutorials

**[Install UI Kitten](guides/install-ui-kitten)**
- **[Start a new App](guides/start-a-new-app)**

This tutorial explains how to setup React Native app with UI Kitten.
This tutorial explains how to setup React Native app with UI Kitten from a scratch.

- **[Install into existing App](guides/install-into-existing-app)**

Please consider creating an issue on GitHub if your use case is not described above. But we kindly ask to always look through the documentation and the list of existing issues first.


<hr>

## I'm new to React Native or mobile development
Expand Down
37 changes: 37 additions & 0 deletions docs/src/articles/guides/install-existing.md
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.
30 changes: 30 additions & 0 deletions docs/src/articles/guides/install-new.md
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.
54 changes: 0 additions & 54 deletions docs/src/articles/guides/install.md

This file was deleted.

15 changes: 13 additions & 2 deletions docs/src/structure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,23 @@ export const structure = [
children: [
{
type: 'page',
name: 'Install UI Kitten',
name: 'Start a new App',
children: [
{
type: 'block',
block: 'markdown',
source: 'guides/install.md',
source: 'guides/install-new.md',
},
],
},
{
type: 'page',
name: 'Install into existing App',
children: [
{
type: 'block',
block: 'markdown',
source: 'guides/install-existing.md',
},
],
},
Expand Down

0 comments on commit 0a3ec77

Please sign in to comment.