Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 757 Bytes

File metadata and controls

29 lines (21 loc) · 757 Bytes

react-native-app-helpers/createMinimumWidthComponent

Creates a React component which has a minimum width.

Usage

import { createMinimumWidthComponent } from "react-native-app-helpers";

const ExampleComponent = createMinimumWidthComponent(243);

const ExampleScreen = () => (
  <ExampleComponent height="fillsContainer">
    <Text>This is up to 243 wide and fills its container vertically.</Text>
  </ExampleComponent>
);
import { createMinimumWidthComponent } from "react-native-app-helpers";

const ExampleComponent = createMinimumWidthComponent(243);

const ExampleScreen = () => (
  <ExampleComponent height="fitsContent">
    <Text>This is up to 243 wide and fits its content vertically.</Text>
  </ExampleComponent>
);