1.0.41 • Published 8 months ago

@os-design-mobile/theming v1.0.41

Weekly downloads
-
License
UNLICENSED
Repository
gitlab
Last release
8 months ago

@os-design-mobile/theming NPM version BundlePhobia

Before you start using the os-design-mobile components, you need to add the ThemeProvider that will apply the theme to all the components used.

Installation

Step 1. Install the package

Install the package using the following command:

yarn add @os-design-mobile/theming

Also make sure that you have the @emotion/native and @react-native-async-storage/async-storage packages installed.

Step 2. Redefine the emotion theme

Create the emotion.d.ts file with the following content:

import '@emotion/react';
import { Theme as BaseTheme } from '@os-design-mobile/theming';

declare module '@emotion/react' {
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
  export interface Theme extends BaseTheme {}
}

Step 3. Wrap your app in ThemeProvider

For example:

import React from 'react';
import { ThemeProvider } from '@os-design-mobile/theming';
import AppNavigator from './AppNavigator';

const App: React.FC = () => (
  <ThemeProvider>
    <AppNavigator />
  </ThemeProvider>
);

export default App;

See all theming features in the os-design's Storybook.

1.0.39

10 months ago

1.0.38

10 months ago

1.0.40

8 months ago

1.0.41

8 months ago

1.0.33

1 year ago

1.0.37

1 year ago

1.0.36

1 year ago

1.0.35

1 year ago

1.0.34

1 year ago

1.0.32

1 year ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.27

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.11

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago