-
-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tooltip): adds tooltip support for restMs and delay properties
implements #589
- Loading branch information
1 parent
8e0b658
commit 73b3dba
Showing
7 changed files
with
96 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
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,54 @@ | ||
import { type CodeData } from '~/components/code-demo'; | ||
import { Button, Tooltip } from '~/src'; | ||
|
||
const code = ` | ||
'use client'; | ||
|
||
import { Button, Tooltip } from 'flowbite-react'; | ||
|
||
function Component() { | ||
return ( | ||
<Tooltip content="Tooltip contexnt" delay={{open: 1000, close: 200}} restMs={100}> | ||
<Button>Delayed tooltip</Button> | ||
</Tooltip> | ||
); | ||
} | ||
`; | ||
|
||
const codeRSC = ` | ||
import { Button, Tooltip } from 'flowbite-react'; | ||
|
||
function Component() { | ||
return ( | ||
<Tooltip content="Tooltip contexnt" delay={{open: 1000, close: 200}} restMs={100}> | ||
<Button>Delayed tooltip</Button> | ||
</Tooltip> | ||
); | ||
} | ||
`; | ||
|
||
function Component() { | ||
return ( | ||
<Tooltip content="Tooltip contexnt" delay={{ open: 1000, close: 200 }} restMs={100}> | ||
<Button>Delayed tooltip</Button> | ||
</Tooltip> | ||
); | ||
} | ||
|
||
export const hoverDelay: CodeData = { | ||
type: 'single', | ||
code: [ | ||
{ | ||
fileName: 'client', | ||
language: 'tsx', | ||
code, | ||
}, | ||
{ | ||
fileName: 'server', | ||
language: 'tsx', | ||
code: codeRSC, | ||
}, | ||
], | ||
githubSlug: 'tooltip/tooltip.hoverDelay.tsx', | ||
component: <Component />, | ||
}; |
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