-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: dropdown-menu 组件分支整理 * feat: 文档修改
- Loading branch information
1 parent
7b86e20
commit cf80b55
Showing
16 changed files
with
1,763 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { FC } from "react"; | ||
import reactify from "@quarkd/reactify"; | ||
import "quarkd/lib/dropdownitem"; | ||
import { | ||
DropdownItemOption, | ||
DropdownItemProps as Props, | ||
CustomEvent, | ||
} from "quarkd/lib/dropdownitem"; | ||
import { componentBaseInterface, ReactifyProps } from "../type"; | ||
|
||
type DropdownItemProps = componentBaseInterface & | ||
ReactifyProps<Props, CustomEvent>; | ||
type DropdownItemType = FC<DropdownItemProps>; | ||
|
||
interface Ref { | ||
setOptions(options: DropdownItemOption[]): void; | ||
toggle(show?: boolean): void; | ||
} | ||
|
||
type DropdownItemInstance = Ref & HTMLElement; | ||
const DropdownItem = reactify("quark-dropdown-item") as DropdownItemType; | ||
export { DropdownItemInstance, DropdownItemProps, DropdownItemOption }; | ||
export default DropdownItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { FC } from "react"; | ||
import reactify from "@quarkd/reactify"; | ||
import "quarkd/lib/dropdownmenu"; | ||
import { | ||
IDropdownMenuProps as Props, | ||
DropdownMenuDirection, | ||
} from "quarkd/lib/dropdownmenu"; | ||
import { componentBaseInterface, ReactifyProps } from "../type"; | ||
|
||
type DropdownMenuProps = componentBaseInterface & ReactifyProps<Props, {}>; | ||
|
||
type DropdownMenuType = FC<DropdownMenuProps>; | ||
|
||
const DropdownMenu = reactify("quark-dropdown-menu") as DropdownMenuType; | ||
|
||
export { DropdownMenuDirection, DropdownMenuProps }; | ||
export default DropdownMenu; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.