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/createLimitedWidthComponent

Creates a React component which has a maximum width.

Usage

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

const ExampleComponent = createLimitedWidthComponent(243);

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

const ExampleComponent = createLimitedWidthComponent(243);

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