From cb0428c053b381b849ecc066eb085f7ad537e81a Mon Sep 17 00:00:00 2001 From: Alex Sanders Date: Thu, 12 Dec 2024 16:08:12 +0000 Subject: [PATCH] add placeholder custom crossword layout --- .../src/components/Crossword.importable.tsx | 98 ++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/dotcom-rendering/src/components/Crossword.importable.tsx b/dotcom-rendering/src/components/Crossword.importable.tsx index 78cda1d207..16633ab2ea 100644 --- a/dotcom-rendering/src/components/Crossword.importable.tsx +++ b/dotcom-rendering/src/components/Crossword.importable.tsx @@ -1,6 +1,102 @@ +import { css } from '@emotion/react'; import { Crossword as ReactCrossword } from '@guardian/react-crossword-next'; import type { CrosswordProps } from '@guardian/react-crossword-next'; +import { + from, + headlineBold17, + palette, + space, + textSans12, + textSans14, +} from '@guardian/source/foundations'; +import { memo } from 'react'; + +const CluesHeader = memo(({ direction }: { direction: 'across' | 'down' }) => { + return ( +
+ {direction} +
+ ); +}); + +const Layout: CrosswordProps['Layout'] = ({ + Grid, + Clues, + Controls, + SavedMessage, + // gridWidth - coming in next version of package +}) => { + // replace with gridWidth from props when package is updated + const gridWidth = '496'; + + return ( +
+
+ + +
+ +
+
+ +
* { + flex: 1; + } + + ${from.wide} { + flex-direction: row; + } + `} + > + + +
+
+ ); +}; export const Crossword = (data: CrosswordProps['data']) => ( - + );