2023-04-19 22:44:06 +02:00
|
|
|
const Image = ({ label, assetSource, handleOpenMediaLibrary }) =>
|
2023-05-29 16:22:34 +02:00
|
|
|
h(
|
|
|
|
"span",
|
2023-09-30 21:15:23 +02:00
|
|
|
{ className: "CMS_Field_wrapper" },
|
2023-05-29 16:22:34 +02:00
|
|
|
h(
|
|
|
|
"label",
|
|
|
|
{
|
2023-09-30 21:15:23 +02:00
|
|
|
className: "CMS_Label_root CMS_Label_cursor-pointer",
|
2023-05-29 16:22:34 +02:00
|
|
|
},
|
|
|
|
label
|
|
|
|
),
|
|
|
|
h(
|
|
|
|
"span",
|
2023-09-30 21:15:23 +02:00
|
|
|
{ className: "CMS_WidgetFileImage_content" },
|
2023-05-29 16:22:34 +02:00
|
|
|
h(
|
|
|
|
"span",
|
|
|
|
{},
|
|
|
|
h("img", {
|
|
|
|
role: "presentation",
|
|
|
|
src: assetSource,
|
2023-09-30 21:15:23 +02:00
|
|
|
className: "CMS_Image_root",
|
2023-05-29 16:22:34 +02:00
|
|
|
})
|
|
|
|
),
|
|
|
|
h(
|
|
|
|
"span",
|
2023-09-30 21:15:23 +02:00
|
|
|
{ className: "CMS_WidgetFileImage_actions" },
|
2023-05-29 16:22:34 +02:00
|
|
|
h(
|
|
|
|
"button",
|
|
|
|
{
|
|
|
|
type: "button",
|
|
|
|
onClick: handleOpenMediaLibrary,
|
2023-09-30 21:15:23 +02:00
|
|
|
className: "CMS_Button_root CMS_Button_outlined-primary",
|
2023-05-29 16:22:34 +02:00
|
|
|
},
|
|
|
|
"Bild auswählen"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
2023-04-19 22:44:06 +02:00
|
|
|
|
|
|
|
export default Image;
|