Update Brands widget to use Image component

This commit is contained in:
prototypa
2024-04-11 23:25:48 -04:00
parent b10ea2b549
commit d05620e2b4
3 changed files with 6 additions and 4 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@onwidget/astrowind", "name": "@onwidget/astrowind",
"version": "1.0.0-beta.24", "version": "1.0.0-beta.25",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@onwidget/astrowind", "name": "@onwidget/astrowind",
"version": "1.0.0-beta.24", "version": "1.0.0-beta.25",
"dependencies": { "dependencies": {
"@astro-community/astro-embed-youtube": "^0.5.2", "@astro-community/astro-embed-youtube": "^0.5.2",
"@astrojs/rss": "^4.0.5", "@astrojs/rss": "^4.0.5",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@onwidget/astrowind", "name": "@onwidget/astrowind",
"version": "1.0.0-beta.24", "version": "1.0.0-beta.25",
"description": "AstroWind: A free template using Astro 4.0 and Tailwind CSS. Astro starter theme.", "description": "AstroWind: A free template using Astro 4.0 and Tailwind CSS. Astro starter theme.",
"type": "module", "type": "module",
"private": true, "private": true,

View File

@@ -1,6 +1,8 @@
--- ---
import { Icon } from 'astro-icon/components'; import { Icon } from 'astro-icon/components';
import type { Brands as Props } from '~/types'; import type { Brands as Props } from '~/types';
import Image from '~/components/common/Image.astro';
import Headline from '~/components/ui/Headline.astro'; import Headline from '~/components/ui/Headline.astro';
import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; import WidgetWrapper from '~/components/ui/WidgetWrapper.astro';
const { const {
@@ -27,7 +29,7 @@ const {
(image) => (image) =>
image.src && ( image.src && (
<div class="flex justify-center col-span-1 my-2 lg:my-4 py-1 px-3 rounded-md dark:bg-gray-200"> <div class="flex justify-center col-span-1 my-2 lg:my-4 py-1 px-3 rounded-md dark:bg-gray-200">
<img src={image.src} alt={image.alt || ''} class="max-h-12" /> <Image src={image.src} alt={image.alt || ''} class="max-h-12" width={120} height={48} layout="fixed" />
</div> </div>
) )
) )