Clean up section components

This commit is contained in:
Konrad Szwarc 2022-08-30 00:32:49 +02:00
parent 2c843d3eb7
commit f3479c9671
2 changed files with 2 additions and 16 deletions

View file

@ -1,11 +1,8 @@
--- ---
import { Image } from '@astrojs/image/components';
import SectionCard from '@/atoms/section-card.astro'; import SectionCard from '@/atoms/section-card.astro';
import type { MainSection } from '@/types/main-section'; import type { MainSection } from '@/types/main-section';
export interface Props extends MainSection {} export interface Props extends MainSection {}
const { image } = Astro.props;
--- ---
<SectionCard>Main section <Image src={image.src} alt={image.alt} width={200} height={200} format="webp" /></SectionCard> <SectionCard>Main section</SectionCard>

View file

@ -1,19 +1,8 @@
--- ---
import Icon from '@/atoms/icon';
import SectionCard from '@/atoms/section-card.astro'; import SectionCard from '@/atoms/section-card.astro';
import type { SkillsSection } from '@/types/skills-section'; import type { SkillsSection } from '@/types/skills-section';
export interface Props extends SkillsSection {} export interface Props extends SkillsSection {}
const { props } = Astro;
--- ---
<SectionCard> <SectionCard>Skills section</SectionCard>
Skills section
<div class="inline-flex space-x-4 ml-4">
{
props.skillSets.flatMap((skillSet) =>
skillSet.skills.map(({ icon, iconColor }) => <Icon client:idle name={icon} size={24} color={iconColor} />)
)
}
</div>
</SectionCard>