@yatoday/astro-ui 0.17.0 → 0.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,7 @@ const {
10
10
  subtitle = await Astro.slots.render('subtitle'),
11
11
  tagline = await Astro.slots.render('tagline'),
12
12
  items = [],
13
+ icon,
13
14
  columns = 2,
14
15
  isAfterContent = false,
15
16
  position = 'center',
@@ -44,6 +45,7 @@ const {
44
45
  items.map((item) => (
45
46
  <Card4
46
47
  {...item}
48
+ icon={item.icon ?? icon}
47
49
  classes={{
48
50
  container: 'p-0 gap-0 border-0 bg-transparent',
49
51
  title: 'text-lg/5 font-semibold',
@@ -6,6 +6,7 @@ import type { Snippet } from 'svelte';
6
6
 
7
7
  export type WidgetFaq1Props = {
8
8
  items?: Card4Props[];
9
+ icon?: string;
9
10
  isAfterContent?: boolean;
10
11
  asHeader?: HeadlineProps['as'];
11
12
  asSubtitle?: HeadlineProps['asSubtitle'];
@@ -15,6 +16,7 @@ export type WidgetFaq1Props = {
15
16
 
16
17
  export type SvelteWidgetFaq1Props = {
17
18
  items?: Card4Props[];
19
+ icon?: string;
18
20
  isAfterContent?: boolean;
19
21
  title?: string | Snippet;
20
22
  subtitle?: string | Snippet;
@@ -39,19 +39,18 @@ const { container: containerClass = '', bg: bgClass = '' } = classes;
39
39
  {
40
40
  image && (
41
41
  <Fragment>
42
- {typeof image === 'string' ? (
42
+ {typeof image === 'string' && image.trim().startsWith('<') ? (
43
43
  <Fragment set:html={image} />
44
44
  ) : (
45
45
  <Image
46
46
  class="absolute inset-0 z-10 size-full object-cover object-right md:object-center"
47
- widths={[400, 900]}
48
47
  widths={[400, 768, 1024, 2040]}
49
48
  sizes="(max-width: 767px) 400px, (max-width: 1023px) 768px, (max-width: 2039px) 1024px, 2040px"
50
49
  loading="eager"
51
50
  width={1024}
52
51
  height={576}
53
52
  layout="fullWidth"
54
- {...image}
53
+ {...(typeof image === 'string' ? { src: image, alt: '' } : image)}
55
54
  />
56
55
  )}
57
56
  </Fragment>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yatoday/astro-ui",
3
3
  "type": "module",
4
- "version": "0.17.0",
4
+ "version": "0.17.2",
5
5
  "scripts": {
6
6
  "prepare": "husky",
7
7
  "pre-commit": "lint-staged",