0.3.7 • Published 5 years ago

@appsimples/atlantica-react-native v0.3.7

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Atlantica

Permission

  • Since this is a private package, you will have to ask for permission to install it in you application
  • Once your npm account has been added to the @appsimples organization, login in your terminal using npm login and you are good to go

Getting Started

1) Adding the lib to your project:

To add this lib to your project, simply run yarn add @appsimples/atlantica-react-native

2) Add a theme to your project:

A theme is an object of the type ATLTheme. It can be added in a file as such:

export const theme = {
  // Colors
  ColorPrimary: '#0073E1',
  ColorLightNeutral: '#9E9E9E',
  ColorDarkNeutral: '#464646',
  ...
}
3) Provide the theme to your project:

In your App.tsx file, wrap your screen with the theme provider, providing the previously created theme.

import React, { Component } from 'react'
import { RootNavigation } from './src/navigation/RootNavigation'
import { ATLThemeProvider } from '@appsimples/atlantica-react-native'
import { theme } from './src/theme/Themes'
import { ATLTheme } from '../build/src/theme/ThemeProvider'

export default class App extends Component<> {
  render() {
    return (
      // ATLThemeProvider is needed here order to have the same theme throughout the whole app
      <ATLThemeProvider theme={theme as ATLTheme}>
        <RootNavigation />
      </ATLThemeProvider>
    )
  }
}

That's all the necessary setup! Now you can finally use a component.

4) Using a component:

Now you simply have to import it into your screen and use it.

import { ATLButton } from '@appsimples/atlantica-react-native'
...
return (
    <ATLButton
        title={'MyButton'}
        onPress={onPressMyButton}
    />
)

For more information on the usage of each component, visit our API documentation here.

5) Stylization:

Your components receive its values from the theme we created on step 2 of this guide. However, if you want a particular instance of it to look different, it can be done by overriding its initial props and replacing it with the desired values. In the example that follows, we want this specific instance of the button to have a fontSize of 30.

import { ATLButton } from '@appsimples/atlantica-react-native'
...
return (
    <ATLButton
        title={'MyButton'}
        onPress={onPressMyButton}
        buttonBaseProps={{
            fontSize: 30
        }}
    />
)
0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.2.35

5 years ago

0.3.2

5 years ago

0.2.34

5 years ago

0.2.33

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.32

5 years ago

0.2.31

5 years ago

0.2.30

5 years ago

0.2.29

5 years ago

0.2.28

5 years ago

0.2.27

5 years ago

0.2.26

5 years ago

0.2.25

5 years ago

0.2.24

5 years ago

0.2.23

5 years ago

0.2.22

5 years ago

0.2.21

5 years ago

0.2.20

5 years ago

0.2.19

5 years ago

0.2.18

5 years ago

0.2.17

5 years ago

0.2.16

5 years ago

0.2.15

5 years ago

0.2.14

5 years ago

0.2.13

5 years ago

0.2.12

5 years ago

0.1.37

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.1.36

6 years ago

0.1.35

6 years ago

0.1.34

6 years ago

0.1.33

6 years ago

0.1.32

6 years ago

0.1.31

6 years ago

0.1.30

6 years ago

0.1.29

6 years ago

0.1.28

6 years ago

0.1.27

6 years ago

0.1.26

6 years ago

0.1.25

6 years ago

0.1.24

6 years ago

0.1.23

6 years ago

0.1.22

6 years ago

0.1.21

6 years ago

0.1.20

6 years ago

0.1.19

6 years ago

0.1.18

6 years ago

0.1.17

6 years ago

0.1.16

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago