File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
src/lib/components/textbadge Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const StyledTextBadge = styled.span<{ variant: TextBadgeVariant }>`
2424 ` }
2525` ;
2626type Props = {
27- text : string ;
27+ text : React . ReactNode ;
2828 className ?: string ;
2929 variant ?: TextBadgeVariant ;
3030} & React . HTMLAttributes < HTMLSpanElement > ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { TextBadge } from '../src/lib/components/textbadge/TextBadge.component' ;
33import { Wrapper , Title } from './common' ;
4+ import { IconHelp } from '../src/lib/components/iconhelper/IconHelper' ;
5+ import { Text } from '../src/lib/components/text/Text.component' ;
46export default {
57 title : 'Components/TextBadge' ,
68 component : TextBadge ,
@@ -21,6 +23,19 @@ export const Default = {
2123 < TextBadge text = "2" variant = "statusWarning" />
2224 < TextBadge text = "3" variant = "statusCritical" />
2325 < TextBadge text = "Badge" variant = "infoSecondary" />
26+ < TextBadge
27+ text = {
28+ < >
29+ < Text > This is a badge with a tooltip</ Text >
30+ < span style = { { marginLeft : '8px' } } >
31+ < IconHelp
32+ tooltipMessage = { < div > This is a tooltip</ div > }
33+ title = "Info"
34+ />
35+ </ span >
36+ </ >
37+ }
38+ />
2439 </ Wrapper >
2540 ) ;
2641 } ,
You can’t perform that action at this time.
0 commit comments