https://github.com/heineiuo/react-native-platform-color
PlatformColor for react-native-web
https://github.com/heineiuo/react-native-platform-color
react react-native
Last synced: 3 months ago
JSON representation
PlatformColor for react-native-web
- Host: GitHub
- URL: https://github.com/heineiuo/react-native-platform-color
- Owner: heineiuo
- Created: 2022-03-07T03:20:33.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-10T10:50:26.000Z (over 4 years ago)
- Last Synced: 2025-01-19T10:29:28.434Z (over 1 year ago)
- Topics: react, react-native
- Language: TypeScript
- Homepage:
- Size: 174 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Native PlatformColor
A `PlatformColor` shim for react-native-web (Did not implement `PlatformColor` yet).
If Platform.OS is not web, use native `PlatformColor` instead.
```tsx
import { PlatformColor } from 'react-native-platform-color'
// in light mode
const systemBackground = PlatformColor('systemBackground') // `rgba(255,255,255, 1) `
// in dark mode
const systemBackground = PlatformColor('systemBackground') // `rgba(0,0,0, 1) `
```