-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding code-block, placeholder line and cleanup some plugins from ana…
…lytics
- Loading branch information
1 parent
f815c14
commit 12f8ac5
Showing
193 changed files
with
3,811 additions
and
3,403 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
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
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
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,68 @@ | ||
import { PlusIcon } from '@heroicons/react/24/solid'; | ||
import Button from '@uidu/button'; | ||
import { ButtonItem, MenuGroup } from '@uidu/menu'; | ||
import Modal, { ModalBody } from '@uidu/modal-dialog'; | ||
import { ShellBody, ShellMain } from '@uidu/shell'; | ||
import React, { useCallback, useState } from 'react'; | ||
import Popup, { ContentProps } from '../src'; | ||
|
||
function Content({ onClose }: ContentProps) { | ||
const [isOpen, setIsOpen] = useState(false); | ||
return ( | ||
<> | ||
<MenuGroup> | ||
<ButtonItem | ||
onClick={() => { | ||
// onClose(); | ||
setIsOpen((prev) => !prev); | ||
// setTimeout(() => { | ||
// onClose(); | ||
// }, 100); | ||
}} | ||
> | ||
Item 1 | ||
</ButtonItem> | ||
</MenuGroup> | ||
{isOpen && ( | ||
<Modal autoFocus> | ||
<ModalBody> | ||
If i select text here I should not close the popup | ||
</ModalBody> | ||
</Modal> | ||
)} | ||
</> | ||
); | ||
} | ||
|
||
export default function PopupWithModal() { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
const Trigger = useCallback( | ||
(triggerProps) => ( | ||
<Button | ||
{...triggerProps} | ||
onClick={() => setIsOpen((prev) => !prev)} | ||
value="Add" | ||
iconBefore={<PlusIcon tw="h-5 w-5" />} | ||
/> | ||
), | ||
[], | ||
); | ||
|
||
return ( | ||
<ShellMain> | ||
<ShellBody> | ||
<div> | ||
<Popup | ||
trigger={Trigger} | ||
content={Content} | ||
isOpen={isOpen} | ||
onClose={() => setIsOpen(false)} | ||
placement="bottom" | ||
autoFocus={false} | ||
/> | ||
</div> | ||
</ShellBody> | ||
</ShellMain> | ||
); | ||
} |
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
69 changes: 0 additions & 69 deletions
69
packages/data/dashboard-controls/src/components/More/index.tsx
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
packages/data/dashboard-controls/src/components/More/types.ts
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
export { default as Members } from './components/Members'; | ||
export { default as More } from './components/More'; | ||
export { default as Navigator } from './components/Navigator'; | ||
export { default as Shuffle } from './components/Shuffle'; | ||
export * from './types'; |
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
Oops, something went wrong.