Skip to content

Commit

Permalink
feat: add type for 'title' prop in AutocompleteSection component
Browse files Browse the repository at this point in the history
  • Loading branch information
ritikpal1122 committed Oct 29, 2024
1 parent 1c1fd39 commit 11af372
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {DividerProps} from "@nextui-org/divider";

import {ListboxItemProps} from "../listbox-item";

export interface ListboxSectionBaseProps<T extends object = {}> extends SectionProps<"ul", T> {
export interface ListboxSectionBaseProps<T extends object = {}>
extends SectionProps<"ul", T, "children" | "title"> {
/**
* The listbox section classNames.
*/
Expand Down
7 changes: 5 additions & 2 deletions packages/utilities/aria-utils/src/collections/section.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ import {HTMLNextUIProps, As} from "@nextui-org/system";
* A modified version of the SectionProps from @react-types/shared, with the addition of the NextUI props.
*
*/
export type SectionProps<Type extends As = "div", T extends object = {}> = BaseSectionProps<T> &
Omit<HTMLNextUIProps<Type>, "children">;
export type SectionProps<
Type extends As = "div",
T extends object = {},
OmitKeys extends string = "children" | "title",
> = BaseSectionProps<T> & Omit<HTMLNextUIProps<Type>, OmitKeys>;

0 comments on commit 11af372

Please sign in to comment.