Skip to content

v0.12.0

Compare
Choose a tag to compare
@EitanElbaz EitanElbaz released this 28 Jun 15:12
· 20 commits to main since this release

Updated the close button component override so it no longer wraps your custom button in its own button.

New CloseButtonProps type:

export type CloseButtonProps = {
    close: ReactGrandTourProps['onClose'];

    // wrap your own close button component in this component to position your component in the same
    // place as the default close button
    PositionalWrapper: React.FC<PropsWithChildren<any>>;
};

Example usage:

const MyCustomCloseButton: React.FC<CloseButtonProps> = ({ close, PositionalWrapper }) => (
    <PositionalWrapper>
        <MyCustomButton onClick={close} />
    </PositionalWrapper>
);