@wordpress/block-editor
Version:
8 lines (7 loc) • 1.66 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../../src/components/url-popover/link-viewer.js"],
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { pencil } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport LinkViewerURL from './link-viewer-url';\n\nexport default function LinkViewer( {\n\tclassName,\n\tlinkClassName,\n\tonEditLinkClick,\n\turl,\n\turlLabel,\n\t...props\n} ) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t'block-editor-url-popover__link-viewer',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<LinkViewerURL\n\t\t\t\turl={ url }\n\t\t\t\turlLabel={ urlLabel }\n\t\t\t\tclassName={ linkClassName }\n\t\t\t/>\n\t\t\t{ onEditLinkClick && (\n\t\t\t\t<Button\n\t\t\t\t\ticon={ pencil }\n\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\tonClick={ onEditLinkClick }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,kBAAmB;AACnB,wBAAuB;AACvB,mBAAuB;AAKvB,6BAA0B;AAWxB;AATa,SAAR,WAA6B;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAI;AACH,SACC;AAAA,IAAC;AAAA;AAAA,MACA,eAAY,YAAAA;AAAA,QACX;AAAA,QACA;AAAA,MACD;AAAA,MACE,GAAG;AAAA,MAEL;AAAA;AAAA,UAAC,uBAAAC;AAAA,UAAA;AAAA,YACA;AAAA,YACA;AAAA,YACA,WAAY;AAAA;AAAA,QACb;AAAA,QACE,mBACD;AAAA,UAAC;AAAA;AAAA,YACA,MAAO;AAAA,YACP,WAAQ,gBAAI,MAAO;AAAA,YACnB,SAAU;AAAA,YACV,MAAK;AAAA;AAAA,QACN;AAAA;AAAA;AAAA,EAEF;AAEF;",
"names": ["clsx", "LinkViewerURL"]
}