Skip to content

Commit

Permalink
Merge pull request #131 from FriedRiceNoodles/feat/dropdown
Browse files Browse the repository at this point in the history
feat(dropdown): add events for dropdown
  • Loading branch information
FriedRiceNoodles authored Apr 11, 2024
2 parents 3cac4d8 + 800c8f5 commit 9ff103b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/strange-owls-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@banana-ui/react': patch
'@banana-ui/banana': patch
---

Add events for dropdown.
8 changes: 8 additions & 0 deletions packages/banana-react/src/dropdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@ import { BDropdown } from '@banana-ui/banana';
import { createComponent } from '@lit-labs/react';
import * as React from 'react';

const events = {
onShow: 'show',
onAfterShow: 'afterShow',
onHide: 'hide',
onAfterHide: 'afterHide',
};

export const Dropdown = createComponent({
tagName: 'b-dropdown',
react: React,
elementClass: BDropdown,
events,
});

0 comments on commit 9ff103b

Please sign in to comment.