Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(PasswordStrength) remove popover in demo #10353

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading