Skip to content

Commit

Permalink
fix(PasswordStrength) remove popover in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik-Petrik committed May 10, 2024
1 parent 3c33eb9 commit c148a83
Showing 1 changed file with 1 addition and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import React from 'react';
import {
Form,
FormGroup,
FormHelperText,
HelperText,
Popover,
HelperTextItem,
TextInput
} from '@patternfly/react-core';
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
import { Form, FormGroup, FormHelperText, HelperText, HelperTextItem, TextInput } from '@patternfly/react-core';
import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon';
import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
Expand Down Expand Up @@ -89,20 +80,6 @@ export const PasswordStrengthDemo: React.FunctionComponent = () => {
}
};

const iconPopover = (
<Popover headerContent={<div>Password Requirements</div>} bodyContent={<div>Password rules</div>}>
<button
type="button"
aria-label="More info for name field"
onClick={(e) => e.preventDefault()}
aria-describedby="password-field"
className="pf-v5-c-form__group-label-help"
>
<HelpIcon />
</button>
</Popover>
);

const passStrLabel = (
<HelperText>
<HelperTextItem variant={passStrength.variant} icon={passStrength.icon}>
Expand All @@ -115,7 +92,6 @@ export const PasswordStrengthDemo: React.FunctionComponent = () => {
<Form>
<FormGroup
label="Password"
labelIcon={iconPopover}
isRequired
fieldId="password-field"
{...(ruleLength === 'success' &&
Expand Down

0 comments on commit c148a83

Please sign in to comment.