-
Notifications
You must be signed in to change notification settings - Fork 1
Add Item component structure based on shadcn #87
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3b9edf2
feat: add Item component structure based on shadcn
BIA3IA 059d5fa
fix: update Button class for better layout in FAQsPage
BIA3IA 7a02cd8
fix: refactor FAQsPage component for improved readability and structure
BIA3IA 2f60392
fix: remove unnecessary blank line in FAQsPage component
BIA3IA 2893654
feat: implement CalloutItem component for improved FAQ navigation
BIA3IA 72a2eb0
fix: biome
BIA3IA f61a2ca
fix: replace useRouter with Link for navigation in CalloutItem component
BIA3IA b0f5123
Merge remote-tracking branch 'origin/main' into bianca/item
toto04 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { FiArrowUpRight } from "react-icons/fi" | ||
| import { Button } from "@/components/ui/button" | ||
| import { Item, ItemActions, ItemContent, ItemInner, ItemTitle } from "@/components/ui/item" | ||
|
|
||
| export default function FAQsPage() { | ||
| return ( | ||
| <main className="w-full"> | ||
| <div className="flex flex-col items-center py-12"> | ||
| <Item className="flex w-full max-w-4xl flex-col"> | ||
| <ItemInner> | ||
| <ItemContent> | ||
| <ItemTitle>Non trovi ciò che stai cercando?</ItemTitle> | ||
| </ItemContent> | ||
| <ItemActions> | ||
| <Button variant="primary" size="lg" className="gap-8 pr-6 pl-10 has-[>svg]:pr-6 has-[>svg]:pl-10"> | ||
| Esplora le Guide | ||
| <FiArrowUpRight /> | ||
| </Button> | ||
|
BIA3IA marked this conversation as resolved.
Outdated
|
||
| </ItemActions> | ||
| </ItemInner> | ||
| </Item> | ||
| </div> | ||
| </main> | ||
| ) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import type * as React from "react" | ||
| import { Glass } from "@/components/glass" | ||
| import { cn } from "@/lib/utils" | ||
|
|
||
| function Item({ className, ...props }: React.ComponentProps<"div">) { | ||
| return ( | ||
| <Glass | ||
| data-slot="item" | ||
| className={cn("rounded-4xl border-white/50 bg-background-blur p-0 text-card-foreground", className)} | ||
| {...props} | ||
| /> | ||
| ) | ||
| } | ||
|
|
||
| function ItemInner({ className, ...props }: React.ComponentProps<"div">) { | ||
| return ( | ||
| <div | ||
| data-slot="item-inner" | ||
| className={cn("flex items-center justify-between gap-4 py-4 pr-4 pl-8", className)} | ||
| {...props} | ||
| /> | ||
| ) | ||
| } | ||
|
|
||
| function ItemContent({ className, ...props }: React.ComponentProps<"div">) { | ||
| return <div data-slot="item-content" className={cn("flex min-w-0 flex-1 items-center", className)} {...props} /> | ||
| } | ||
|
|
||
| function ItemTitle({ className, ...props }: React.ComponentProps<"p">) { | ||
| return <p data-slot="item-title" className={cn("typo-title-medium text-blue-secondary", className)} {...props} /> | ||
| } | ||
|
|
||
| function ItemActions({ className, ...props }: React.ComponentProps<"div">) { | ||
| return <div data-slot="item-actions" className={cn("flex shrink-0 items-center", className)} {...props} /> | ||
| } | ||
|
|
||
| export { Item, ItemInner, ItemContent, ItemTitle, ItemActions } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.