summaryrefslogtreecommitdiff
path: root/src/components/widgets/Features.astro
blob: 8f42b62a71051c097432775002a9b059ef7f4d89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
import WidgetWrapper from '~/components/ui/WidgetWrapper.astro';
import ItemGrid from '~/components/ui/ItemGrid.astro';
import Headline from '~/components/ui/Headline.astro';
import type { Features as Props } from '~/types';

const {
  title = await Astro.slots.render('title'),
  subtitle = await Astro.slots.render('subtitle'),
  tagline = await Astro.slots.render('tagline'),
  items = [],
  columns = 2,

  defaultIcon,

  id,
  isDark = false,
  classes = {},
  bg = await Astro.slots.render('bg'),
} = Astro.props;
---

<WidgetWrapper id={id} isDark={isDark} containerClass={`max-w-5xl ${classes?.container ?? ''}`} bg={bg}>
  <Headline title={title} subtitle={subtitle} tagline={tagline} classes={classes?.headline as Record<string, string>} />
  <ItemGrid
    items={items}
    columns={columns}
    defaultIcon={defaultIcon}
    classes={{
      container: '',
      title: 'md:text-[1.3rem]',
      icon: 'text-white bg-primary rounded-full w-10 h-10 p-2 md:w-12 md:h-12 md:p-3 mr-4 rtl:ml-4 rtl:mr-0',
      ...((classes?.items as Record<string, never>) ?? {}),
    }}
  />
</WidgetWrapper>