Skip to content

Commit

Permalink
✏️ Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
leeandher committed Feb 28, 2025
1 parent 8f580ea commit e5649f2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions static/app/components/tours/components.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Fragment, useContext, useEffect, useMemo} from 'react';
import {Fragment, type HTMLAttributes, useContext, useEffect, useMemo} from 'react';
import {useTheme} from '@emotion/react';
import styled from '@emotion/styled';

Expand Down Expand Up @@ -78,7 +78,7 @@ export function TourContextProvider<T extends TourEnumType>({
}

export interface TourElementProps<T extends TourEnumType>
extends Partial<UseOverlayProps> {
extends Omit<HTMLAttributes<HTMLElement>, 'id' | 'title'> {
/**
* The content being focused during the tour.
*/
Expand All @@ -100,9 +100,9 @@ export interface TourElementProps<T extends TourEnumType>
*/
tourContext: React.Context<TourContextType<T> | null>;
/**
* The className of the wrapper element.
* The position of the tour element.
*/
className?: string;
position?: UseOverlayProps['position'];
}

export function TourElement<T extends TourEnumType>({
Expand Down Expand Up @@ -153,13 +153,13 @@ function TourElementContent<T extends TourEnumType>({

return (
<Fragment>
<ElementWrapper
<TourTriggerWrapper
className={className}
ref={triggerProps.ref}
aria-expanded={triggerProps['aria-expanded']}
>
{children}
</ElementWrapper>
</TourTriggerWrapper>
{isOpen ? (
<PositionWrapper zIndex={theme.zIndex.tour.overlay} {...overlayProps}>
<TourOverlay animated>
Expand Down Expand Up @@ -210,7 +210,7 @@ const BlurWindow = styled('div')`
backdrop-filter: blur(3px);
`;

const ElementWrapper = styled('div')`
const TourTriggerWrapper = styled('div')`
&[aria-expanded='true'] {
position: relative;
z-index: ${p => p.theme.zIndex.tour.element};
Expand Down

0 comments on commit e5649f2

Please sign in to comment.