-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feature search results #92
Conversation
The accordian content overlaps when collapsing. Also, is there a reason why you aren't using the accordian from shadcn? Which would make your code alot simpler and not need Your solution of passing in components directly isn't bad at all; was just hoping for it to have a similar design structure as the model components like so: interface SearchResults<Category extends string> {
data: SearchResult[];
groupBy: (searchResult: SearchResult) => Category
getLabel: ({ category: Category, items: SearchResult[] }) => ReactNode
getContent: ({ category: Category, items: SearchResult[] }) => ReactNode
} You can see how much more powerful the customization of the label and content can become as it now has direct access to the content and category. |
2nd round of changes:
|
tailwind.config.js
Outdated
"accordion-down": { | ||
from: { height: "0" }, | ||
to: { height: "var(--radix-accordion-content-height)" }, | ||
}, | ||
"accordion-up": { | ||
from: { height: "var(--radix-accordion-content-height)" }, | ||
to: { height: "0" }, | ||
'accordion-down': { | ||
from: { | ||
height: '0' | ||
}, | ||
to: { | ||
height: 'var(--radix-accordion-content-height)' | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you make these changes or was it something from a tailwind update lol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might have been from the install of a shadcn component that needed accordion and/or our formatter. Should I revert the change?
Changes
Usage
SearchResults contains several props for customization.
The Components and Wrapper will receive props that may be useful for conditional rendering of certain parts if desired