Skip to content

Commit bb80129

Browse files
author
Eric Olkowski
committed
Fixed example file names
1 parent 23d02b1 commit bb80129

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/react-core/src/components/HelperText/HelperTextItem.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export interface HelperTextItemProps extends React.HTMLProps<HTMLDivElement | HT
3838
}
3939

4040
const defaultVariantIcons = {
41-
default: <></>,
4241
indeterminate: <MinusIcon />,
4342
warning: <ExclamationTriangleIcon />,
4443
success: <CheckCircleIcon />,
@@ -57,15 +56,16 @@ export const HelperTextItem: React.FunctionComponent<HelperTextItemProps> = ({
5756
}: HelperTextItemProps) => {
5857
const Component = component as any;
5958
const isNotDefaultVariant = variant !== 'default';
59+
const defaultIcon = isNotDefaultVariant && defaultVariantIcons[variant];
6060
return (
6161
<Component
6262
className={css(styles.helperTextItem, isNotDefaultVariant && styles.modifiers[variant], className)}
6363
id={id}
6464
{...props}
6565
>
66-
{(isNotDefaultVariant || icon) && (
66+
{(defaultIcon || icon) && (
6767
<span className={css(styles.helperTextItemIcon)} aria-hidden>
68-
{icon || defaultVariantIcons[variant]}
68+
{icon || defaultIcon}
6969
</span>
7070
)}
7171

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ import ExclamationIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-
1515

1616
### Basic
1717

18-
```ts file="HelperTextStatic.tsx"
18+
```ts file="HelperTextBasic.tsx"
1919

2020
```
2121

2222
### With custom icons
2323

24-
```ts file="HelperTextStaticWithCustomIcon.tsx"
24+
```ts file="HelperTextWithCustomIcon.tsx"
2525

2626
```
2727

2828
### Multiple items
2929

3030
You can pass multiple `<HelperTextItem>` components inside a single `<Helpertext>` container.
3131

32-
```ts file="HelperTextMultipleStatic.tsx"
32+
```ts file="HelperTextMultipleItems.tsx"
3333

3434
```

0 commit comments

Comments
 (0)