-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9eeadd1
commit ece12ba
Showing
28 changed files
with
509 additions
and
770 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,29 @@ | ||
export const tooltipDataApi = [ | ||
{ | ||
id: 1, | ||
propsName: 'title', | ||
propsType: 'string', | ||
propsDescription: 'Title of the tooltip.', | ||
default: 'Tooltip Text', | ||
}, | ||
{ | ||
id: 2, | ||
propsName: 'children', | ||
propsType: 'ReactNode', | ||
propsDescription: 'Child elements to trigger the tooltip.', | ||
default: '<Button/>', | ||
}, | ||
{ | ||
id: 3, | ||
propsName: 'content', | ||
propsType: 'ReactNode', | ||
propsDescription: 'Content of the tooltip.', | ||
default: 'Text', | ||
}, | ||
{ | ||
id: 4, | ||
propsName: 'placement', | ||
propsType: ['top', 'bottom', 'left', 'right'], | ||
propsType: [ | ||
'top', | ||
'bottom', | ||
'left', | ||
'right', | ||
'top-start', | ||
'top-end', | ||
'right-start', | ||
'right-end', | ||
'bottom-start', | ||
'bottom-end', | ||
'left-start', | ||
'left-end', | ||
], | ||
propsDescription: 'Placement of the tooltip.', | ||
default: 'top', | ||
}, | ||
{ | ||
id: 5, | ||
id: 2, | ||
propsName: 'trigger', | ||
propsType: ['hover', 'click'], | ||
propsType: ['hover', 'click', 'focus'], | ||
propsDescription: 'Trigger mode for displaying the tooltip.', | ||
default: 'hover', | ||
}, | ||
{ | ||
id: 6, | ||
propsName: 'style', | ||
propsType: ['dark', 'light'], | ||
propsDescription: 'Style of the tooltip.', | ||
default: 'dark', | ||
}, | ||
{ | ||
id: 7, | ||
propsName: 'animation', | ||
propsType: 'false | `duration-${number}`', | ||
propsDescription: 'Animation duration class for the tooltip.', | ||
default: 'false', | ||
}, | ||
{ | ||
id: 8, | ||
propsName: 'arrow', | ||
propsType: 'boolean', | ||
propsDescription: 'Show or hide the tooltip arrow sign.', | ||
default: 'true', | ||
}, | ||
] |
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,33 +1,34 @@ | ||
'use client' | ||
import { Button, Tooltip } from '../../../../src' | ||
import { Tooltip } from '../../../../src' | ||
|
||
const DefaultTooltip = () => { | ||
return ( | ||
<Tooltip content="Tooltips text here" trigger="hover" placement="right" animation="duration-300" style="dark"> | ||
<Button size="sm">Default Tooltip</Button> | ||
</Tooltip> | ||
<div className="p-2.5"> | ||
<Tooltip> | ||
<Tooltip.Action>Tooltip</Tooltip.Action> | ||
<Tooltip.Content> | ||
<p className="text-body-5 font-medium text-white">Tooltips - Title here</p> | ||
</Tooltip.Content> | ||
</Tooltip> | ||
</div> | ||
) | ||
} | ||
|
||
const DefaultTooltipCode = ` | ||
"use client"; | ||
import { Button,Tooltip } from "keep-react"; | ||
'use client' | ||
import { Tooltip } from 'keep-react' | ||
export const TooltipComponent = () => { | ||
return ( | ||
<Tooltip | ||
content="Tooltips text here" | ||
trigger="hover" | ||
placement="right" | ||
animation="duration-300" | ||
style="dark" | ||
> | ||
<Button size="sm" > | ||
Default Tooltip | ||
</Button> | ||
<Tooltip> | ||
<Tooltip.Action>Tooltip</Tooltip.Action> | ||
<Tooltip.Content> | ||
<p className="text-body-5 font-medium text-white">Tooltips - Title here</p> | ||
</Tooltip.Content> | ||
</Tooltip> | ||
); | ||
) | ||
} | ||
` | ||
|
||
export { DefaultTooltip, DefaultTooltipCode } |
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,79 +1,40 @@ | ||
'use client' | ||
import { Button, Tooltip } from '../../../../src' | ||
import { Tooltip } from '../../../../src' | ||
|
||
const TooltipPlacement = () => { | ||
return ( | ||
<div className="my-8 flex flex-wrap items-end gap-2"> | ||
<Tooltip content="Tooltips text here" trigger="hover" placement="top" animation="duration-300" style="dark"> | ||
<Button size="sm">Tooltip Top</Button> | ||
</Tooltip> | ||
<Tooltip content="Tooltips text here" trigger="hover" placement="bottom" animation="duration-300" style="dark"> | ||
<Button size="sm">Tooltip Bottom</Button> | ||
</Tooltip> | ||
<Tooltip content="Tooltips text here" trigger="hover" placement="left" animation="duration-300" style="dark"> | ||
<Button size="sm">Tooltip Left</Button> | ||
</Tooltip> | ||
<Tooltip content="Tooltips text here" trigger="hover" placement="right" animation="duration-300" style="dark"> | ||
<Button size="sm">Tooltip Right</Button> | ||
</Tooltip> | ||
<div className="flex items-center gap-5 p-2.5"> | ||
{['top', 'bottom', 'left', 'right'].map((position) => ( | ||
<Tooltip placement={position as 'bottom' | 'top' | 'left' | 'right'} key={position}> | ||
<Tooltip.Action>Tooltip</Tooltip.Action> | ||
<Tooltip.Content> | ||
<p className="text-body-5 font-medium text-white">Tooltips - Title here</p> | ||
</Tooltip.Content> | ||
</Tooltip> | ||
))} | ||
</div> | ||
) | ||
} | ||
|
||
const TooltipPlacementCode = ` | ||
"use client"; | ||
import { Button,Tooltip } from "keep-react"; | ||
'use client' | ||
import { Tooltip } from 'keep-react' | ||
export const TooltipComponent = () => { | ||
return ( | ||
<> | ||
<Tooltip | ||
content="Tooltips text here" | ||
trigger="hover" | ||
placement="top" | ||
animation="duration-300" | ||
style="dark" | ||
> | ||
<Button size="sm" > | ||
Tooltip Top | ||
</Button> | ||
</Tooltip> | ||
<Tooltip | ||
content="Tooltips text here" | ||
trigger="hover" | ||
placement="bottom" | ||
animation="duration-300" | ||
style="dark" | ||
> | ||
<Button size="sm" > | ||
Tooltip Bottom | ||
</Button> | ||
</Tooltip> | ||
<Tooltip | ||
content="Tooltips text here" | ||
trigger="hover" | ||
placement="left" | ||
animation="duration-300" | ||
style="dark" | ||
> | ||
<Button size="sm" > | ||
Tooltip Left | ||
</Button> | ||
</Tooltip> | ||
<Tooltip | ||
content="Tooltips text here" | ||
trigger="hover" | ||
placement="right" | ||
animation="duration-300" | ||
style="dark" | ||
> | ||
<Button size="sm" > | ||
Tooltip Right | ||
</Button> | ||
</Tooltip> | ||
{['top', 'bottom', 'left', 'right'].map((position) => ( | ||
<Tooltip placement={position} key={position}> | ||
<Tooltip.Action>Tooltip</Tooltip.Action> | ||
<Tooltip.Content> | ||
<p className="text-body-5 font-medium text-white">Tooltips - Title here</p> | ||
</Tooltip.Content> | ||
</Tooltip> | ||
))} | ||
</> | ||
); | ||
) | ||
} | ||
` | ||
|
||
export { TooltipPlacement, TooltipPlacementCode } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.