Skip to content

Commit f8893d5

Browse files
committed
update example name
1 parent 3faa51e commit f8893d5

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
@@ -32,9 +32,9 @@ import './Label.css';
3232

3333
### Label with custom render
3434

35-
Labels may be passed a custom renderer to display customized content or for use with router components.
35+
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.
3636

37-
```ts file="LabelRouterLink.tsx"
37+
```ts file="LabelCustomRender.tsx"
3838

3939
```
4040

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)