From 5929c5a667de7409438346b6bdbb1420b0d8f72e Mon Sep 17 00:00:00 2001 From: ArraysID Date: Sun, 27 Apr 2025 05:38:34 +0700 Subject: [PATCH] feat: migrate features component --- apps/landing/src/app/_components/features.tsx | 126 ++++++++++++++++++ apps/landing/src/app/page.tsx | 2 + libs/shadcn-ui/src/atoms/icons.tsx | 13 +- 3 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 apps/landing/src/app/_components/features.tsx diff --git a/apps/landing/src/app/_components/features.tsx b/apps/landing/src/app/_components/features.tsx new file mode 100644 index 0000000..40ed3e1 --- /dev/null +++ b/apps/landing/src/app/_components/features.tsx @@ -0,0 +1,126 @@ +'use client'; + +import { + BookOpenIcon, + CodeIcon, + LaptopIcon, + UsersIcon, +} from '@imphnen-frontend-service/shadcn-ui/atoms'; +import { motion, useInView } from 'framer-motion'; +import { useRef } from 'react'; + +export function Features() { + const ref = useRef(null); + const isInView = useInView(ref, { once: true, amount: 0.2 }); + + const features = [ + { + icon: , + title: 'Belajar Tanpa Koding', + description: + 'Pelajari konsep programming dengan cara yang mudah dipahami tanpa harus menulis kode yang rumit.', + }, + { + icon: , + title: 'Komunitas Supportif', + description: + 'Bergabunglah dengan komunitas programmer Indonesia yang siap membantu dan berbagi pengalaman.', + }, + { + icon: , + title: 'Tutorial Interaktif', + description: + 'Akses tutorial interaktif yang membuat konsep programming lebih mudah untuk dipahami.', + }, + { + icon: , + title: 'Proyek Praktis', + description: + 'Terapkan pengetahuan Anda dalam proyek nyata dengan panduan langkah demi langkah.', + }, + ]; + + const containerVariants = { + hidden: { opacity: 0 }, + visible: { + opacity: 1, + transition: { + staggerChildren: 0.1, + }, + }, + }; + + const itemVariants = { + hidden: { y: 20, opacity: 0 }, + visible: { + y: 0, + opacity: 1, + transition: { duration: 0.5 }, + }, + }; + + return ( +
+ {/* Background Elements */} +
+
+
+
+ +
+
+ +
+ Fitur Unggulan +
+

+ Belajar programming dengan{' '} + + cara yang lebih baik + +

+

+ IMPHNEN hadir dengan berbagai fitur untuk membantu kamu menjadi + programmer handal tanpa harus pusing dengan coding. +

+
+
+ + + {features.map((feature, index) => ( + +
+ +
+
+ {feature.icon} +
+

{feature.title}

+

{feature.description}

+
+ +
+ + ))} + +
+
+ ); +} diff --git a/apps/landing/src/app/page.tsx b/apps/landing/src/app/page.tsx index 4bdfedc..201ecc8 100644 --- a/apps/landing/src/app/page.tsx +++ b/apps/landing/src/app/page.tsx @@ -1,3 +1,4 @@ +import { Features } from './_components/features'; import { Header } from './_components/header'; import { Hero } from './_components/hero'; @@ -7,6 +8,7 @@ export default function Page() {
+
); diff --git a/libs/shadcn-ui/src/atoms/icons.tsx b/libs/shadcn-ui/src/atoms/icons.tsx index 758c44f..81f0e71 100644 --- a/libs/shadcn-ui/src/atoms/icons.tsx +++ b/libs/shadcn-ui/src/atoms/icons.tsx @@ -1,10 +1,21 @@ import { LuArrowDown as ArrowDownIcon, + LuBookOpen as BookOpenIcon, LuCode as CodeIcon, + LuLaptop as LaptopIcon, LuMenu as MenuIcon, LuSparkles as SparklesIcon, LuUsers as UsersIcon, LuX as XIcon, } from 'react-icons/lu'; -export { ArrowDownIcon, CodeIcon, MenuIcon, SparklesIcon, UsersIcon, XIcon }; +export { + ArrowDownIcon, + BookOpenIcon, + CodeIcon, + LaptopIcon, + MenuIcon, + SparklesIcon, + UsersIcon, + XIcon, +};