This is a library for standard gel react components made easy
The three things gel has:
npm i -S gel-react
import React from 'react'
import { Wrap, Layout, LayoutItem } from 'gel-react/grid'
import { Canon, DoublePica, GreatPrimer, LongPrimer, } from 'gel-react/typography'
import { Audio } from 'gel-react/iconography'
let Component = () => {
return <Wrap>
<Layout
layouts={['rev']}>
<LayoutItem
gels={['1/1', '1/2@m', '1/4@l']}>
<Canon><Audio />First</Canon>
</LayoutItem>
<LayoutItem
gels={['1/1', '1/2@m', '1/4@l']}>
<GreatPrimer bold>Second</GreatPrimer>
</LayoutItem>
<LayoutItem
gels={['1/1', '1/2@m', '1/4@l']}>
<DoublePica>Third</DoublePica>
</LayoutItem>
<LayoutItem
gels={['1/1', '1/2@m', '1/4@l']}>
<LongPrimer>Fourth</LongPrimer>
</LayoutItem>
</Layout>
</Wrap>
}
export default ComponentAvailable gels and sizes:
123458101224@s@m@l@xl@xxl
Available layouts:
flushrevmiddlebottomrightcenterautoequalfit
<Wrap
gels={[
'1/1',
'1/2@m',
'1/4@l'
]}>content</Wrap><Layout
layouts={[
'rev'
]}
gels={[
'1/1',
'1/2@m',
'1/4@l'
]}
>content</Layout>layouts can also be a string e.g.
<Layout layouts='flush'>content</Layout><LayoutItem
gels={[
'1/1',
'1/2@m',
'1/4@l'
]}>content</LayoutItem>You can prefix the gels with 'gel-' e.g.
<LayoutItem gels={['gel-1/2', 'gel-1/4@m']}>content</LayoutItem>gels can also be a string e.g.
<LayoutItem gels='1/2'>content</LayoutItem>All are the same
<Canon bold={true} noTouch={true}>Your Content</Canon>Available typographies:
CanonTrafalgarDoublePicaGreatPrimerPicaLongPrimerBrevierMinionBodyCopy
<IconName />the output is an svg wrapped in a div with the class names gel-icon and gel-icon-${icon-name}
Available Icons: Icon List
If you need to update the icons do the following
git clone git@github.com:bbc/gel-iconography-assets.git gel-iconography-assets || pushd gel-iconography-assets && git pull && popd
node ./scripts/create-icons.js
cat iconography.js | cut -d'.' -f2 | cut -d' ' -f1 | sed -e 's/^/* /' > icon-list.mdYou can find more documentation from Gel