Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[@mantine/core] Tooltip: Add inline prop support (#2500)
- Loading branch information
Showing
7 changed files
with
90 additions
and
4 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
45 changes: 45 additions & 0 deletions
45
src/mantine-demos/src/demos/core/Tooltip/Tooltip.demo.inline.tsx
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,45 @@ | ||
import React from 'react'; | ||
import { MantineDemo } from '@mantine/ds'; | ||
import { Tooltip, Mark, Text } from '@mantine/core'; | ||
|
||
const code = ` | ||
import { Tooltip, Mark, Text } from '@mantine/core'; | ||
function Demo() { | ||
return ( | ||
<Text> | ||
Stantler’s magnificent antlers were traded at high prices as works of art. As a result, this | ||
Pokémon was hunted close to extinction by those who were after the priceless antlers.{' '} | ||
<Tooltip inline label="Inline tooltip"> | ||
<Mark>When visiting a junkyard</Mark> | ||
</Tooltip> | ||
, you may catch sight of it having an intense fight with Murkrow over shiny objects.Ho-Oh’s | ||
feathers glow in seven colors depending on the angle at which they are struck by light. These | ||
feathers are said to bring happiness to the bearers. This Pokémon is said to live at the foot | ||
of a rainbow. | ||
</Text> | ||
); | ||
} | ||
`; | ||
|
||
function Demo() { | ||
return ( | ||
<Text> | ||
Stantler’s magnificent antlers were traded at high prices as works of art. As a result, this | ||
Pokémon was hunted close to extinction by those who were after the priceless antlers.{' '} | ||
<Tooltip inline label="Inline tooltip"> | ||
<Mark>When visiting a junkyard</Mark> | ||
</Tooltip> | ||
, you may catch sight of it having an intense fight with Murkrow over shiny objects.Ho-Oh’s | ||
feathers glow in seven colors depending on the angle at which they are struck by light. These | ||
feathers are said to bring happiness to the bearers. This Pokémon is said to live at the foot | ||
of a rainbow. | ||
</Text> | ||
); | ||
} | ||
|
||
export const inline: MantineDemo = { | ||
type: 'demo', | ||
component: Demo, | ||
code, | ||
}; |
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