33 * Backstage IDP Implementation section of the homepage
44 */
55import { Image } from ' astro:assets'
6+ import Icon from ' @components/Icon/index.astro'
67import backstageBackground from ' @assets/images/backstage-background.jpg'
78
8- type IconKey = keyof typeof svgPath
99export interface Props {
1010 pretitle: string
1111 description: string
@@ -16,19 +16,12 @@ export interface Props {
1616 features: {
1717 title: string
1818 description: string
19- icon: IconKey
19+ icon: string
2020 }[]
2121}
2222
2323const { pretitle, description, benefits, features } = Astro .props as Props
2424
25- const svgPath = {
26- ' left-justified' : ' M4 6h16M4 12h16M4 18h7' ,
27- ' clipboard' : ' M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2' ,
28- ' lightning-bolt' : ' M13 10V3L4 14h7v7l9-11h-7z' ,
29- ' graph' : ' M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z' ,
30- } as const
31-
3225const visibleBenefits = benefits .slice (0 , 3 )
3326const visibleFeatures = features .slice (0 , 4 )
3427---
@@ -69,20 +62,7 @@ const visibleFeatures = features.slice(0, 4)
6962 <div class = " bg-page-offset p-6 rounded-xl border border-trim" >
7063 <div class = " flex items-center gap-3 mb-4" >
7164 <div class = " w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center" >
72- <svg
73- class = " w-5 h-5 text-primary"
74- fill = " none"
75- stroke = " currentColor"
76- viewBox = " 0 0 24 24"
77- aria-hidden = " true"
78- >
79- <path
80- stroke-linecap = " round"
81- stroke-linejoin = " round"
82- stroke-width = " 2"
83- d = { svgPath [feature .icon ]}
84- ></path >
85- </svg >
65+ <Icon icon = { feature .icon } size = { 5 } color = " primary" isListMarker = { false } />
8666 </div >
8767 <span class = " font-bold text-content-active" >{ feature .title } </span >
8868 </div >
@@ -99,7 +79,7 @@ const visibleFeatures = features.slice(0, 4)
9979 class =" relative inline-flex items-center gap-2 bg-primary hover:bg-primary-offset text-page-base font-bold px-6 py-3 rounded-full transition-colors whitespace-nowrap focus-visible:outline-none after:pointer-events-none after:absolute after:-inset-1 after:rounded-none after:content-[''] focus-visible:after:border-2 focus-visible:after:border-spotlight"
10080 >
10181 Let's talk
102- <svg class = " w-4 h-4 " fill = " none " stroke = " currentColor " viewBox = " 0 0 24 24 " aria-hidden = " true " >< path stroke-linecap = " round " stroke-linejoin = " round " stroke-width = " 2 " d = " M17 8l4 4m0 0l-4 4m4-4H3 " ></ path ></ svg >
82+ <Icon icon = " exit-right-thin " size = { 4 } classes = " mb-1 " / >
10383 </a >
10484 </div >
10585 </div >
0 commit comments