-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(DatePicker): resolved page scrolling bug
- Loading branch information
1 parent
8fa6757
commit 9907582
Showing
5 changed files
with
79 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
packages/react-core/src/components/Popover/examples/PopoverCustomFocus.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; | ||
import { Popover, Button } from '@patternfly/react-core'; | ||
|
||
export const PopoverCustomFocus: React.FunctionComponent = () => ( | ||
<Popover | ||
elementToFocus="#popover-cancel-button" | ||
showClose={false} | ||
aria-label="Popover with custom focus" | ||
headerContent={<div>Popover header</div>} | ||
bodyContent={ | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit.{' '} | ||
<Button | ||
// Preventing default click behavior for example purposes only | ||
onClick={(event: React.MouseEvent) => event.preventDefault()} | ||
component="a" | ||
isInline | ||
variant="link" | ||
href="#basic" | ||
> | ||
View the basic example | ||
</Button> | ||
</div> | ||
} | ||
footerContent={(hide) => ( | ||
<Button onClick={hide} variant="secondary" id="popover-cancel-button"> | ||
Cancel | ||
</Button> | ||
)} | ||
> | ||
<Button>Toggle popover with custom focus</Button> | ||
</Popover> | ||
); |