@not-govuk/width-container
v0.15.2
Published
A simple container to limit the width of its contents.
Downloads
919
Readme
Width Container
A simple container to limit the width of its contents.
This is used by the page components to control the width of the page contents. Users will not typically need to use this.
Using this package
First install the package into your project:
npm install -S @not-govuk/width-container
Then use it in your code as follows:
import React, { createElement as h } from 'react';
import WidthContainer from '@not-govuk/width-container';
const myMaxWidthInPixels = 300;
export const MyComponent = props => (
<WidthContainer maxWidth={myMaxWidthInPixels}>
My contents
</WidthContainer>
);
export default MyComponent;
Working on this package
Before working on this package you must install its dependencies using the following command:
pnpm install
Testing
npm test
Building
npm run build
Clean-up
npm run clean