-
Notifications
You must be signed in to change notification settings - Fork 13
Added hover interaction to FAQ items #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -96,17 +96,24 @@ function FAQItem({ question, answer, isOpen, onClick, index, icon }: FAQItemProp | |||||
|
|
||||||
| return ( | ||||||
| <motion.div | ||||||
| className={`rounded-xl overflow-hidden transition-all duration-300 | ||||||
| bg-white dark:bg-black | ||||||
| border | ||||||
| ${isOpen | ||||||
| ? 'border- 6 border-pink-500 dark:border-grey-500' | ||||||
| : 'border- 6 - dark:border-grey-500'} | ||||||
| `} | ||||||
| initial={{ opacity: 0, y: 30 }} | ||||||
| whileInView={{ opacity: 1, y: 0 }} | ||||||
| transition={{ duration: 0.5, delay: index * 0.1 }} | ||||||
| viewport={{ once: true }} | ||||||
| className={`rounded-xl overflow-hidden | ||||||
| bg-white dark:bg-black | ||||||
| border-2 | ||||||
| transition-colors duration-200 | ||||||
| ${isOpen | ||||||
| ? 'border-green-400 dark:border-green-500 shadow-md' | ||||||
| : 'border-gray-200 dark:border-gray-700 hover:border-green-300 dark:hover:border-green-600'} | ||||||
| `} | ||||||
| whileHover={{ | ||||||
| y: -6, | ||||||
| scale: 1.02, | ||||||
| boxShadow: "0 12px 24px rgba(0,0,0,0.15)" | ||||||
| }} | ||||||
| transition={{ | ||||||
| type: "spring", | ||||||
| stiffness: 300, | ||||||
| damping: 20 | ||||||
| }} | ||||||
| > | ||||||
| <button | ||||||
| className="flex justify-between items-center w-full text-left p-6 group" | ||||||
|
|
@@ -149,7 +156,7 @@ function FAQItem({ question, answer, isOpen, onClick, index, icon }: FAQItemProp | |||||
|
|
||||||
| function BackgroundAnimation({ darkMode }: { darkMode: boolean }) { | ||||||
| return ( | ||||||
| <div className="absolute inset-0 overflow-hidden"> | ||||||
| <div className="absolute inset-0 -z-10 pointer-events-none overflow-hidden"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Drop the negative z-index from the background layer.
Suggested patch- <div className="absolute inset-0 -z-10 pointer-events-none overflow-hidden">
+ <div className="absolute inset-0 z-0 pointer-events-none overflow-hidden">📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| {/* Fixed dots pattern */} | ||||||
| <div className="absolute inset-0" style={{ | ||||||
| backgroundImage: `radial-gradient(${darkMode ? '#4B5563' : '#e5e7eb'} 1px, transparent 0)`, | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.