Skip to content

Commit 8ae5bbf

Browse files
committed
update example name
1 parent a2d30ea commit 8ae5bbf

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

packages/react-core/src/components/Label/examples/Label.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ import './Label.css';
3131

3232
### Label with custom render
3333

34-
Labels may be passed a custom renderer to display customized content or for use with router components.
34+
Labels may be passed a custom renderer to display customized content or for use with router components. When using a custom render, `isClickable` may also be passed to remove the underline text decoration of anchors or router links.
3535

36-
```ts file="LabelRouterLink.tsx"
36+
```ts file="LabelCustomRender.tsx"
3737

3838
```
3939

packages/react-core/src/components/Label/examples/LabelRouterLink.tsx renamed to packages/react-core/src/components/Label/examples/LabelCustomRender.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import { Label } from '@patternfly/react-core';
33
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
44

5-
export const LabelRouterLink: React.FunctionComponent = () => (
5+
export const LabelCustomRender: React.FunctionComponent = () => (
66
<Label
77
color="blue"
88
icon={<InfoCircleIcon />}
@@ -11,14 +11,9 @@ export const LabelRouterLink: React.FunctionComponent = () => (
1111
<a className={className} ref={componentRef}>
1212
{content}
1313
</a>
14-
/** A router link would look like the following:
15-
* <Link to="/" className={className} ref={componentRef}>
16-
* {content}
17-
* </Link>
18-
*/
1914
)}
2015
textMaxWidth="16ch"
21-
isClickable // can be passed manually to remove the default underline text-decoration of links
16+
isClickable
2217
>
2318
Blue label router link with icon that overflows
2419
</Label>

0 commit comments

Comments
 (0)