Files
.gitea
assets
content
data
i18n
layouts
static
admin
links
previews
shortcodes
components
card.js
image.js
index.js
text-field.js
audio.js
card.js
download.js
gallery.js
image.js
index.js
slider.js
youtube.js
config.yml
icons.js
index.html
data
schulchronik
favicon.ico
.gitignore
LICENSE
config.yml
gcg-website/static/admin/shortcodes/components/image.js
Denys Konovalov 13dde42eb0 Static CMS v2.0 ()
- [x] Update auf Static CMS v2.0
- [x] aktualisierte Shortcodes (schließt )
- [x] aktualisierte Previews (schließt )
- Ordnerunterstützung
- [x] vervollständigte Seiten
- [x] Aufräumarbeiten

Reviewed-on: 
2023-04-19 22:44:06 +02:00

42 lines
855 B
JavaScript

const Image = ({ label, assetSource, handleOpenMediaLibrary }) =>
h(
"span",
{ className: "flex flex-col w-full" },
h(
"label",
{
className:
"w-full flex text-xs font-bold dark:font-semibold group-focus-within/active:text-blue-500 group-hover/active:text-blue-500 cursor-text text-slate-500 dark:text-slate-400 px-3 pt-3",
},
label
),
h(
"span",
{ className: "flex flex-col gap-2 px-3 pt-2" },
h(
"span",
{},
h("img", {
role: "presentation",
src: assetSource,
className: "object-cover max-w-full overflow-hidden",
})
),
h(
"span",
{ className: "flex gap-2" },
h(
"button",
{
type: "button",
onClick: handleOpenMediaLibrary,
className: "btn btn-contained-primary",
},
"Bild auswählen"
)
)
)
);
export default Image;