fixed Flyout in gestalt (#44001)

* fixed Flyout in gestalt

* use any instead of HTMLAnchorElement
This commit is contained in:
Kyle Hensel 2020-04-27 04:53:14 +12:00 committed by GitHub
parent 8dd9ed9de2
commit b6bf351a2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -56,7 +56,7 @@ const MasonryComponent = ({}) => {
<Column span={1} />;
<Container />;
<Divider />;
<Flyout onDismiss={() => {}} anchor={React.useRef()} />;
<Flyout onDismiss={() => {}} anchor={React.useRef().current} />;
<Heading />;
<Icon accessibilityLabel="icon" />;
<IconButton accessibilityLabel="icon" />;

View File

@ -4,6 +4,7 @@
// Josh Gachnang <https://github.com/joshgachnang>
// Calvin Chhour <https://github.com/calvinchhour>
// Muhammed Hafiz <https://github.com/zifahm>
// Kyle Hensel <https://github.com/k-yle>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@ -238,7 +239,7 @@ https://pinterest.github.io/gestalt/#/Flyout
*/
export interface FlyoutProps {
anchor: React.RefObject<any>;
anchor: any; // ideally a HTMLAnchorElement
onDismiss: () => void;
children?: React.ReactNode;
color?: 'blue' | 'orange' | 'red' | 'white' | 'darkGray';