https://github.com/cawfree/react-native-uri-box
An extendible React <Component/> which will attempt to render source content consistently, based on the MIME type.
https://github.com/cawfree/react-native-uri-box
arbitrary content generic react react-native uri
Last synced: about 1 year ago
JSON representation
An extendible React <Component/> which will attempt to render source content consistently, based on the MIME type.
- Host: GitHub
- URL: https://github.com/cawfree/react-native-uri-box
- Owner: cawfree
- License: mit
- Created: 2019-08-29T14:37:44.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-26T13:02:29.000Z (over 3 years ago)
- Last Synced: 2025-03-18T13:15:27.637Z (over 1 year ago)
- Topics: arbitrary, content, generic, react, react-native, uri
- Language: JavaScript
- Size: 38.1 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-uri-box
An extendible React <Component/> which will attempt to render source content consistently, based on the MIME type.
## 🚀 Getting Started
Using [`npm`]():
```sh
yarn add react-native-uri-box
```
Using [`yarn`]():
```sh
yarn add react-native-uri-box
```
## ✍️ Example
Just use this as a drop-in component for your remote content:
```javascript
import UriBox, { LookUpTable } from 'react-native-uri-box';
import Video from 'react-native-video';
const App = () => (
(
),
}}
/>
);
```
## 📌 Prop Types
Property | Type | Required | Default value | Description
:--- | :--- | :--- | :--- | :---
Component|custom|no|View| Defines the parent for your content. As an example, you could pass an ` to render whilst loading.
UnsupportedComponent|custom|no|<See the source code>|What to render if the requested MIME type is not supported.
style|shape|no|styles.container| Parent component styling. The dynamic contents will be sized to fill this .
source|union|no|null|What source to render; expects an object with a single key `uri`.
lookUpTable|shape|no|<See the source code>|Defines the table of mappings to determine which components are used for which MIME types.
-----
## ✌️ License
[MIT](https://opensource.org/licenses/MIT)