Responsive components for react native.
npm install react-native-fitReact Native responsive components.
npm install react-native-fit --save
yarn add react-native-fit
Image props + FitImage ones
javascript
import FitImage from 'react-native-fit/fitImage';
render() {
return round={false} // default false - make an image round/square
style={ {} } // supports any style, can add width and will generate the height to ratio
/>
}
`
Supports all Video props + FitVideo ones
https://github.com/react-native-community/react-native-video
`javascript
import FitVideo from 'react-native-fit/fitVideo';
render() {
return playable={true} // default true - make video playable (useful when you want to open in a modal)
playIcon={true} // default true - show/hide play icon on video
style={ {} } // supports any style, can add width and will generate the height to ratio
/>
}
`
Supports all Modal props + FitModal ones
https://facebook.github.io/react-native/docs/modal.html
`javascript
import FitModal from 'react-native-fit/fitModal';
render() {
return (
text conten} // React Component to render inside fullscreen Modal
style={ {} } // Style for the thumbnail that will open the Modal, Text in this case
>
open Modal
);
}
`
Use fitModal with fitImage and fitVideo:
`javascript
import { FitModal, FitImage, FitVideo } from 'react-native-fit';
render() {
return (
}>
}>
);
}
``