# react-native-platform-stylesheet

> Platform Specific Stylesheet for React Native

Latest version **0.0.6** (published 2016-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-platform-stylesheet
pnpm add react-native-platform-stylesheet
yarn add react-native-platform-stylesheet
bun add react-native-platform-stylesheet
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2016-07-25 |
| First published | 2016-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 88 |
| Author | Mateusz Zatorski |
| Maintainers | knowbody |
| Keywords | react-native, stylesheet, ios, android, platform, react |

## Links

- npm: https://www.npmjs.com/package/react-native-platform-stylesheet
- Repository: https://github.com/knowbody/react-native-platform-stylesheet
- Homepage: https://github.com/knowbody/react-native-platform-stylesheet#readme
- Issues: https://github.com/knowbody/react-native-platform-stylesheet/issues
- npm.io page: https://npm.io/package/react-native-platform-stylesheet

## Dependencies (1)

- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.8.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2016-07-25
- 0.0.5 — 2016-05-04
- 0.0.4 — 2016-05-04
- 0.0.3 — 2016-05-04
- 0.0.2 — 2016-05-04
- 0.0.1 — 2016-05-04

## README

React Native Platform Stylesheet
===

Seperated out the [F8StyleSheet](https://github.com/fbsamples/f8app/blob/master/js/common/F8StyleSheet.js) to a module.

### Get started

1. `npm install react-native-platform-stylesheet`

2. Use it in your project:

  ```js
  import { create } from 'react-native-platform-stylesheet';
  
  
  const Profile = () => (
    <View style={styles.container}>
      {/* ... */}
    </View>
  );
  
  const styles = create({
    container: {
      flex: 1,
      ios: {
        backgroundColor: 'salmon'
      },
      android: {
        backgroundColor: 'tomato'
      }
    }
  });
  ```
  
  or
  
  ```js
  import { create } from 'react-native-platform-stylesheet';
  
  
  const Profile = () => (
    <View style={styles.container}>
      {/* ... */}
    </View>
  );
  
  const styles = create({
    container: {
      flex: 1
    },
    ios: {
      container: {
        backgroundColor: 'salmon'
      }
    },
    android: {
      container: {
        backgroundColor: 'tomato'
      }
    }
  });
  ```
  
  *Note: in the second example, make sure that `ios` and `android` styles are defined in the end of the object.*

---
_Source: https://npm.io/package/react-native-platform-stylesheet · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
