UNPKG

@wordpress/editor

Version:
8 lines (7 loc) 2.27 kB
{ "version": 3, "sources": ["../../../src/components/style-book/duotone-examples.tsx"], "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __experimentalGrid as Grid } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { Duotone } from './types';\n\nconst DuotoneExamples = ( { duotones }: { duotones: Duotone[] } ) => {\n\tif ( ! duotones ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Grid columns={ 2 } rowGap={ 16 } columnGap={ 16 }>\n\t\t\t{ duotones.map( ( duotone: Duotone ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Grid\n\t\t\t\t\t\tkey={ duotone.slug }\n\t\t\t\t\t\tclassName=\"editor-style-book__duotone-example\"\n\t\t\t\t\t\tcolumns={ 2 }\n\t\t\t\t\t\trowGap={ 8 }\n\t\t\t\t\t\tcolumnGap={ 8 }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\talt={ `Duotone example: ${ duotone.slug }` }\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/core/5.3/MtBlanc1.jpg\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tfilter: `url(#wp-duotone-${ duotone.slug })`,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{ duotone.colors.map( ( color ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={ color }\n\t\t\t\t\t\t\t\t\tclassName=\"editor-style-book__color-example\"\n\t\t\t\t\t\t\t\t\tstyle={ { backgroundColor: color } }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Grid>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Grid>\n\t);\n};\n\nexport default DuotoneExamples;\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAA2C;AAgBtC;AATL,IAAM,kBAAkB,CAAE,EAAE,SAAS,MAAgC;AACpE,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA,SACC,4CAAC,kBAAAA,oBAAA,EAAK,SAAU,GAAI,QAAS,IAAK,WAAY,IAC3C,mBAAS,IAAK,CAAE,YAAsB;AACvC,WACC;AAAA,MAAC,kBAAAA;AAAA,MAAA;AAAA,QAEA,WAAU;AAAA,QACV,SAAU;AAAA,QACV,QAAS;AAAA,QACT,WAAY;AAAA,QAEZ;AAAA,sDAAC,SACA;AAAA,YAAC;AAAA;AAAA,cACA,KAAM,oBAAqB,QAAQ,IAAK;AAAA,cACxC,KAAI;AAAA,cACJ,OAAQ;AAAA,gBACP,QAAQ,mBAAoB,QAAQ,IAAK;AAAA,cAC1C;AAAA;AAAA,UACD,GACD;AAAA,UACE,QAAQ,OAAO,IAAK,CAAE,UAAW;AAClC,mBACC;AAAA,cAAC;AAAA;AAAA,gBAEA,WAAU;AAAA,gBACV,OAAQ,EAAE,iBAAiB,MAAM;AAAA;AAAA,cAF3B;AAAA,YAGP;AAAA,UAEF,CAAE;AAAA;AAAA;AAAA,MAvBI,QAAQ;AAAA,IAwBf;AAAA,EAEF,CAAE,GACH;AAEF;AAEA,IAAO,2BAAQ;", "names": ["Grid"] }