Skip to content

Commit

Permalink
Refactor #4431 - add Tooltip pt for Dropdown d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
habubey committed Jun 2, 2023
1 parent 73511a8 commit 6ad51bb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
7 changes: 7 additions & 0 deletions components/doc/common/apidoc/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -17947,6 +17947,13 @@
"readonly": false,
"type": "DropdownPassThroughType<HTMLAttributes<HTMLOptionElement>>",
"description": "Uses to pass attributes to the option's DOM element."
},
{
"name": "tooltip",
"optional": true,
"readonly": false,
"type": "TooltipPassThroughOptions",
"description": "Uses to pass attributes tooltip's DOM element."
}
],
"callbacks": []
Expand Down
4 changes: 0 additions & 4 deletions components/doc/dropdown/pt/ptdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function PTDoc(props) {
options={cities}
optionLabel="name"
placeholder="Select a City"
className="w-full md:w-14rem"
pt={{
root: { className: 'w-full md:w-14rem' },
item: ({ context }) => ({
Expand Down Expand Up @@ -52,7 +51,6 @@ export default function PTDemo() {
options={cities}
optionLabel="name"
placeholder="Select a City"
className="w-full md:w-14rem"
pt={{
root: { className: 'w-full md:w-14rem' },
item: ({ context }) => ({
Expand Down Expand Up @@ -91,7 +89,6 @@ export default function PTDemo() {
options={cities}
optionLabel="name"
placeholder="Select a City"
className="w-full md:w-14rem"
pt={{
root: { className: 'w-full md:w-14rem' },
item: ({ context }) => ({
Expand All @@ -115,7 +112,6 @@ export default function PTDemo() {
options={cities}
optionLabel="name"
placeholder="Select a City"
className="w-full md:w-14rem"
pt={{
root: { className: 'w-full md:w-14rem' },
item: ({ context }) => ({
Expand Down
6 changes: 6 additions & 0 deletions components/lib/dropdown/dropdown.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import * as React from 'react';
import { CSSTransitionProps } from '../csstransition';
import { SelectItemOptionsType } from '../selectitem/selectitem';
import { TooltipPassThroughOptions } from '../tooltip/tooltip';
import { TooltipOptions } from '../tooltip/tooltipoptions';
import { FormEvent } from '../ts-helpers';
import { IconType, PassThroughType } from '../utils';
Expand Down Expand Up @@ -108,6 +109,11 @@ export interface DropdownPassThroughOptions {
* Uses to pass attributes to the option's DOM element.
*/
option?: DropdownPassThroughType<React.HTMLAttributes<HTMLOptionElement>>;
/**
* Uses to pass attributes tooltip's DOM element.
* @type {TooltipPassThroughOptions}
*/
tooltip?: TooltipPassThroughOptions;
}

/**
Expand Down

0 comments on commit 6ad51bb

Please sign in to comment.