Skip to content
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

test: fix test issues #27

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/components/menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const MenuComponent = ({
(e: React.MouseEvent) => {
const el = e.target as HTMLElement;
if (el.dataset.id) {
onClick?.(el.dataset.id);
onClick?.(el.dataset.id as AnyObject);
}
},
[onClick],
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/menu/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

import { type ElementType } from "react";
import { type ElementType, type MouseEvent } from "react";
import {
type AriaProps,
type BadgeType,
Expand Down Expand Up @@ -77,7 +77,7 @@ export interface MenuItemProps
/**
* click handler
*/
onClick?: () => CallbackReturn;
onClick?: (e: MouseEvent) => CallbackReturn;
}

export interface MenuRootProps extends CssProp {
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/components/tabpanel/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ export interface TabProps
* close handler
*/
onClose?: () => CallbackReturn;
/**
* click handler
*/
onClick?: (id: string) => CallbackReturn;
}

export const Tab = <Tag extends React.ElementType = "button">({
Expand Down
Loading