To use the HOC asLayout you can wrap any component with it. For instance, to make a p HTML element work like a Layout component you could do:

import { asLayout } from 'gymnast' const P = asLayout('p')

You can also wrap any other React component like follows:

import { asLayout } from 'gymnast' const MyComponent = props => <span {...props} /> const MyLayoutComponent = asLayout(MyComponent)

Once the component is wrapped in asLayout it behaves just like any other <Layout />. To view the full API check the Layout section.