Debian Codegraph @

node/@patternfly/react-core/src/components/Label/examples/LabelCustomRender.tsx

raw
1 import { Label, LabelColor } from '@patternfly/react-core';
2 import RhUiInformationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-information-fill-icon';
3
4 export const LabelCustomRender: React.FunctionComponent = () => (
5 <Label
6 color={LabelColor.blue}
7 icon={<RhUiInformationFillIcon />}
8 onClose={() => Function.prototype}
9 render={({ className, content, componentRef }) => (
10 <a className={className} ref={componentRef}>
11 {content}
12 </a>
13 )}
14 textMaxWidth="16ch"
15 isClickable
16 >
17 Blue label router link with icon that overflows
18 </Label>
19 );