import React from 'react' import classnames from 'classnames' /** * The available layout widths for the Layout component. * * Available options: * - inset-left - 5 columns (500 pixels), medium screens and above: 3 columns (300 pixels), float left * - inset-right - 5 columns (500 pixels), medium screens and above: 3 columns (300 pixels), float right * - `in-line` - [Default] 7 columns (700 pixels) * - `full-width` - Legacy alias for `in-line` * - `mid-grid` - 9 columns (900 pixels) * - `full-grid` - 12 columns of the grid (1200 pixels) * * @todo Existing layouts not currently supported by this component. To be implemented in the future: * @todo `full-bleed` - Edge to edge of the viewport, no padding * @todo The terminology in Spark doesn't align with our terminology. For instance, Editorial uses `full-width` that we map to `full-grid`. We should likely move towards an ubiquitous language prioritising the Editorial one. */ type LayoutWidth = | 'in-line' | 'mid-grid' | 'full-grid' | 'inset-left' | 'inset-right' interface ContentLayoutProps { dataLayout?: LayoutWidth dataComponent?: string className?: string children: React.ReactNode } /* * @description OverflowingLayout component prevent clashes with ads on the RHR (Righthand-rail) and share bar * via the usage of data-layout-width='full-grid' * See related code here: https://github.com/Financial-Times/next-article/blob/5766d82de6125ffc99fa6e3bc132311b3434f8f0/client/components/share/main.js#L8 */ const OverflowingLayout: React.FC<{ children: React.ReactNode }> = ({ children, }) => (