mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-15 11:40:29 +03:00
Add animation on hover in sidebar
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
c1e3645d57
commit
e20b9d054d
3 changed files with 15 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ import './Tooltip.scss';
|
|||
import Tippy from '@tippyjs/react';
|
||||
|
||||
function Tooltip({
|
||||
className, placement, content, children,
|
||||
className, placement, content, delay, children,
|
||||
}) {
|
||||
return (
|
||||
<Tippy
|
||||
|
|
@ -14,7 +14,7 @@ function Tooltip({
|
|||
arrow={false}
|
||||
maxWidth={250}
|
||||
placement={placement}
|
||||
delay={[0, 0]}
|
||||
delay={delay}
|
||||
duration={[100, 0]}
|
||||
>
|
||||
{children}
|
||||
|
|
@ -25,12 +25,14 @@ function Tooltip({
|
|||
Tooltip.defaultProps = {
|
||||
placement: 'top',
|
||||
className: '',
|
||||
delay: [200, 0],
|
||||
};
|
||||
|
||||
Tooltip.propTypes = {
|
||||
className: PropTypes.string,
|
||||
placement: PropTypes.string,
|
||||
content: PropTypes.node.isRequired,
|
||||
delay: PropTypes.arrayOf(PropTypes.number),
|
||||
children: PropTypes.node.isRequired,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue