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

TeachingPopover: New Carousel and minor styling fixes #30998

Merged
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
8ee0c73
Enable strings to be passed via slots, and add additional props for v…
Mitch-At-Work Apr 2, 2024
913e18e
Update page count to enable string, or override with react node
Mitch-At-Work Apr 2, 2024
7bd5fe2
Update change log and snapshots
Mitch-At-Work Apr 2, 2024
dee8bb6
Tidy up
Mitch-At-Work Apr 2, 2024
bb9b0a5
Store for now, split into hooks
Mitch-At-Work Apr 4, 2024
798644c
Update carousel
Mitch-At-Work Apr 4, 2024
ab3d36b
Fix bugs in carousel edge cases
Mitch-At-Work Apr 5, 2024
65d4bdc
Fix bugs in carousel edge cases on removal
Mitch-At-Work Apr 5, 2024
46c2fd3
Comment
Mitch-At-Work Apr 5, 2024
69215a4
Tidy up carousel
Mitch-At-Work Apr 5, 2024
89b2fcb
Fix up high contrast mode
Mitch-At-Work Apr 5, 2024
8c955e4
Should be thin style
Mitch-At-Work Apr 5, 2024
d7cb6e3
Fix up examples and types
Mitch-At-Work Apr 8, 2024
a891bda
Update docs and build
Mitch-At-Work Apr 8, 2024
0b13623
logical properties for LTR
Mitch-At-Work Apr 8, 2024
4d5621d
Fix types
Mitch-At-Work Apr 8, 2024
9925ac3
Fix tests
Mitch-At-Work Apr 8, 2024
e05ad23
Fix up lint
Mitch-At-Work Apr 8, 2024
2eaa86b
Fix up lint
Mitch-At-Work Apr 8, 2024
772b585
Update tests
Mitch-At-Work Apr 8, 2024
98c6d12
Add new components for carousel
Mitch-At-Work Apr 9, 2024
947dc3a
cleanup CarouselWalkerContext
layershifter Apr 10, 2024
95522c7
cleanup usage of TeachingPopoverCarouselContextValues
layershifter Apr 10, 2024
6e5759d
fix allow to control Carousel
layershifter Apr 10, 2024
65457c1
chore cleanup CarouselContext
layershifter Apr 10, 2024
ad28da6
chore do not export contexts
layershifter Apr 10, 2024
66fc5af
chore isolate store access to useCarouselValues()
layershifter Apr 10, 2024
864268e
chore remove usage of useCarouselValues_unstable() in CarouselItem
layershifter Apr 10, 2024
a8c9e8f
fix remove dead types
layershifter Apr 10, 2024
155b189
chore move selection logic to Carousel
layershifter Apr 10, 2024
9756fdf
chore remove CarouselWalkerContext
layershifter Apr 10, 2024
7a8a41d
chore context polling in useTeachingPopoverCarouselFooter_unstable
layershifter Apr 10, 2024
5b154d4
chore cleanup stories
layershifter Apr 10, 2024
14099de
fix clear store
layershifter Apr 10, 2024
c126bd7
fix use useEventCallback
layershifter Apr 10, 2024
45a1ce2
chore cleanup useTeachingPopoverCarouselNavButton
layershifter Apr 10, 2024
d1aff2d
Fix up tests
Mitch-At-Work Apr 10, 2024
f63f1a4
Remove unneeded aria-label
Mitch-At-Work Apr 10, 2024
dd4a584
Update tests and imports, tidy up effect deps
Mitch-At-Work Apr 10, 2024
26908af
chore minor fixes, new tests
layershifter Apr 11, 2024
41825dd
new nav method
Mitch-At-Work Apr 11, 2024
2d9c1a9
Add page count as its own jsx
Mitch-At-Work Apr 11, 2024
9d1b5e2
Add new button class
Mitch-At-Work Apr 12, 2024
750acab
Update types and generate API
Mitch-At-Work Apr 12, 2024
0a61389
Fix up button types and add alt text
Mitch-At-Work Apr 12, 2024
80eb984
Update API and remove unneeded import
Mitch-At-Work Apr 12, 2024
d394c74
Fix up tests
Mitch-At-Work Apr 12, 2024
5d295f0
Fix test
Mitch-At-Work Apr 14, 2024
6cdc297
use walker instead of node sibling
Mitch-At-Work Apr 15, 2024
d714805
Replace carousel item with v9 JSX
Mitch-At-Work Apr 15, 2024
a8ac93a
Update api and tests
Mitch-At-Work Apr 15, 2024
623a5a7
Tidy up
Mitch-At-Work Apr 15, 2024
7d2285e
Move types to dev deps
Mitch-At-Work Apr 15, 2024
972159a
Fix story import
Mitch-At-Work Apr 15, 2024
af8a9ca
chore minor cleanups
layershifter Apr 16, 2024
6315856
Remove token import (unneeded)
Mitch-At-Work Apr 16, 2024
71562c7
Update API
Mitch-At-Work Apr 16, 2024
f2cd109
Update snapshot
Mitch-At-Work Apr 16, 2024
71d284c
Update types and tests
Mitch-At-Work Apr 16, 2024
90dad1f
Update API
Mitch-At-Work Apr 16, 2024
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
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feat: Ensure all sub components are overridable and enable better string pass through via slots",
"packageName": "@fluentui/react-teaching-popover-preview",
"email": "mifraser@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ TeachingPopoverTitle is intended to provide a sub-header for TeachingPopoverBody

#### TeachingPopoverBody

This body section encapsulates a standardized media slot, with short/medium/tall size settings via mediaLength prop (TeachingPopoverBodyMediaLength type). It also acts as a boundary for pages within a TeachingPopoverCarousel, and will be paginated based on this encapsulation.
This body section encapsulates a standardized media slot, with short/medium/tall size settings via mediaLength prop. It also acts as a boundary for pages within a TeachingPopoverCarousel, and will be paginated based on this encapsulation.

## Accessibility

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import { ARIAButtonSlotProps } from '@fluentui/react-aria';
import { Button } from '@fluentui/react-button';
import { ButtonProps } from '@fluentui/react-button';
import { ButtonState } from '@fluentui/react-button';
import { ComponentProps } from '@fluentui/react-utilities';
import { ComponentState } from '@fluentui/react-utilities';
import type { ContextSelector } from '@fluentui/react-context-selector';
import { EventData } from '@fluentui/react-utilities';
import { EventHandler } from '@fluentui/react-utilities';
import { FC } from 'react';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import { JSXElementConstructor } from 'react';
import { PopoverContextValue } from '@fluentui/react-popover';
Expand All @@ -24,10 +24,9 @@ import { PopoverSurfaceState } from '@fluentui/react-popover';
import { PopoverTriggerChildProps } from '@fluentui/react-popover';
import { PopoverTriggerProps } from '@fluentui/react-popover';
import { PopoverTriggerState } from '@fluentui/react-popover';
import { Provider } from 'react';
import { ProviderProps } from 'react';
import * as React_2 from 'react';
import { ReactElement } from 'react';
import { ReactNode } from 'react';
import { Slot } from '@fluentui/react-utilities';
import type { SlotClassNames } from '@fluentui/react-utilities';

Expand All @@ -40,12 +39,24 @@ export const renderTeachingPopoverBody_unstable: (state: TeachingPopoverBodyStat
// @public
export const renderTeachingPopoverCarousel_unstable: (state: TeachingPopoverCarouselState, contextValues: TeachingPopoverCarouselContextValues) => JSX.Element;

// @public
export const renderTeachingPopoverCarouselCard_unstable: (state: TeachingPopoverCarouselCardState) => JSX.Element;

// @public
export const renderTeachingPopoverCarouselFooter_unstable: (state: TeachingPopoverCarouselFooterState) => JSX.Element;

// @public
export const renderTeachingPopoverCarouselFooterButton_unstable: (state: TeachingPopoverCarouselFooterButtonState) => JSX.Element;

// @public
export const renderTeachingPopoverCarouselNav_unstable: (state: TeachingPopoverCarouselNavState) => JSX.Element;

// @public
export const renderTeachingPopoverCarouselNavButton_unstable: (state: TeachingPopoverCarouselNavButtonState) => JSX.Element;

// @public
export const renderTeachingPopoverCarouselPageCount_unstable: (state: TeachingPopoverCarouselPageCountState) => JSX.Element;

// @public
export const renderTeachingPopoverFooter_unstable: (state: TeachingPopoverFooterState) => JSX.Element;

Expand All @@ -70,12 +81,9 @@ export const TeachingPopoverBody: ForwardRefComponent<TeachingPopoverBodyProps>;
// @public (undocumented)
export const teachingPopoverBodyClassNames: SlotClassNames<TeachingPopoverBodySlots>;

// @public (undocumented)
export type TeachingPopoverBodyMediaLength = 'short' | 'medium' | 'tall';

// @public (undocumented)
export type TeachingPopoverBodyProps = ComponentProps<TeachingPopoverBodySlots> & {
mediaLength?: TeachingPopoverBodyMediaLength;
mediaLength?: 'short' | 'medium' | 'tall';
};

// @public (undocumented)
Expand All @@ -85,16 +93,77 @@ export type TeachingPopoverBodySlots = {
};

// @public (undocumented)
export type TeachingPopoverBodyState = ComponentState<TeachingPopoverBodySlots> & Partial<Pick<TeachingPopoverBodyProps, 'mediaLength'>>;
export type TeachingPopoverBodyState = ComponentState<TeachingPopoverBodySlots> & Required<Pick<TeachingPopoverBodyProps, 'mediaLength'>>;

// @public
export const TeachingPopoverCarousel: ForwardRefComponent<TeachingPopoverCarouselProps>;

// @public
export const TeachingPopoverCarouselCard: ForwardRefComponent<TeachingPopoverCarouselCardProps>;

// @public (undocumented)
export const teachingPopoverCarouselCardClassNames: SlotClassNames<TeachingPopoverCarouselCardSlots>;

// @public (undocumented)
export type TeachingPopoverCarouselCardProps = ComponentProps<TeachingPopoverCarouselCardSlots> & {
value: string;
};

// @public (undocumented)
export type TeachingPopoverCarouselCardSlots = {
root: NonNullable<Slot<'div'>>;
};

// @public (undocumented)
export type TeachingPopoverCarouselCardState = ComponentState<TeachingPopoverCarouselCardSlots> & Required<Pick<TeachingPopoverCarouselCardProps, 'value'>>;

// @public (undocumented)
export const teachingPopoverCarouselClassNames: SlotClassNames<TeachingPopoverCarouselSlots>;

// @public
export type TeachingPopoverCarouselContextValue = Pick<TeachingPopoverCarouselState, 'currentPage' | 'setCurrentPage' | 'totalPages' | 'onPageChange'>;
export const TeachingPopoverCarouselFooter: ForwardRefComponent<TeachingPopoverCarouselFooterProps>;

// @public
export const TeachingPopoverCarouselFooterButton: ForwardRefComponent<TeachingPopoverCarouselFooterButtonProps>;

// @public (undocumented)
export const teachingPopoverCarouselFooterButtonClassNames: SlotClassNames<TeachingPopoverCarouselFooterButtonSlots>;

// @public
export type TeachingPopoverCarouselFooterButtonProps = ComponentProps<TeachingPopoverCarouselFooterButtonSlots> & ButtonProps & {
navType: 'next' | 'prev';
altText: ReactNode;
};

// @public (undocumented)
export type TeachingPopoverCarouselFooterButtonSlots = {
root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;
};

// @public
export type TeachingPopoverCarouselFooterButtonState = ComponentState<TeachingPopoverCarouselFooterButtonSlots> & ButtonState & Pick<TeachingPopoverCarouselFooterButtonProps, 'navType' | 'altText'> & {
popoverAppearance: PopoverContextValue['appearance'];
};

// @public (undocumented)
export const teachingPopoverCarouselFooterClassNames: SlotClassNames<TeachingPopoverCarouselFooterSlots>;

// @public
export type TeachingPopoverCarouselFooterProps = ComponentProps<TeachingPopoverCarouselFooterSlots> & {
layout?: TeachingPopoverCarouselFooterLayout;
initialStepText: string;
finalStepText: string;
};

// @public (undocumented)
export type TeachingPopoverCarouselFooterSlots = {
root: NonNullable<Slot<'div'>>;
previous?: Slot<TeachingPopoverCarouselFooterButtonProps>;
next: NonNullable<Slot<TeachingPopoverCarouselFooterButtonProps>>;
};

// @public
export type TeachingPopoverCarouselFooterState = ComponentState<Required<TeachingPopoverCarouselFooterSlots>> & Partial<Pick<PopoverContextValue, 'appearance'>> & Pick<TeachingPopoverCarouselFooterProps, 'layout'>;

// @public
export const TeachingPopoverCarouselNav: ForwardRefComponent<TeachingPopoverCarouselNavProps>;
Expand All @@ -106,9 +175,7 @@ export const TeachingPopoverCarouselNavButton: ForwardRefComponent<TeachingPopov
export const teachingPopoverCarouselNavButtonClassNames: SlotClassNames<TeachingPopoverCarouselNavButtonSlots>;

// @public
export type TeachingPopoverCarouselNavButtonProps = ComponentProps<Partial<TeachingPopoverCarouselNavButtonSlots>> & {
index: number;
};
export type TeachingPopoverCarouselNavButtonProps = ComponentProps<TeachingPopoverCarouselNavButtonSlots> & {};

// @public (undocumented)
export type TeachingPopoverCarouselNavButtonSlots = {
Expand All @@ -124,7 +191,9 @@ export type TeachingPopoverCarouselNavButtonState = ComponentState<TeachingPopov
export const teachingPopoverCarouselNavClassNames: SlotClassNames<TeachingPopoverCarouselNavSlots>;

// @public (undocumented)
export type TeachingPopoverCarouselNavProps = ComponentProps<Partial<TeachingPopoverCarouselNavSlots>>;
export type TeachingPopoverCarouselNavProps = Omit<ComponentProps<Partial<TeachingPopoverCarouselNavSlots>>, 'children'> & {
children: NavButtonRenderFunction;
};

// @public (undocumented)
export type TeachingPopoverCarouselNavSlots = {
Expand All @@ -133,39 +202,51 @@ export type TeachingPopoverCarouselNavSlots = {

// @public (undocumented)
export type TeachingPopoverCarouselNavState = ComponentState<TeachingPopoverCarouselNavSlots> & {
currentPage: number;
totalPages: number;
values: string[];
renderNavButton: NavButtonRenderFunction;
};

// @public
export type TeachingPopoverCarouselProps = Partial<ComponentProps<TeachingPopoverCarouselSlots>> & {
layout?: TeachingPopoverCarouselLayout;
paginationType?: 'text' | 'icon';
strings: TeachingPopoverStrings;
defaultCurrentPage?: number;
onPageChange?: EventHandler<TeachingPopoverPageChangeData>;
onFinish?: EventHandler<TeachingPopoverPageChangeData>;
currentPage?: number;
export const TeachingPopoverCarouselPageCount: ForwardRefComponent<TeachingPopoverCarouselPageCountProps>;

// @public (undocumented)
export const teachingPopoverCarouselPageCountClassNames: SlotClassNames<TeachingPopoverCarouselPageCountSlots>;

// @public
export type TeachingPopoverCarouselPageCountProps = Omit<ComponentProps<Partial<TeachingPopoverCarouselPageCountSlots>>, 'children'> & {
children: TeachingPopoverCarouselPageCountRenderFunction;
};

// @public (undocumented)
export const TeachingPopoverCarouselProvider: Provider<TeachingPopoverCarouselContextValue> & FC<ProviderProps<TeachingPopoverCarouselContextValue>>;
export type TeachingPopoverCarouselPageCountRenderFunction = (currentPage: number, totalPages: number) => React_2.ReactNode;

// @public (undocumented)
export type TeachingPopoverCarouselPageCountSlots = {
root: Slot<'div'>;
};

// @public
export type TeachingPopoverCarouselPageCountState = ComponentState<TeachingPopoverCarouselPageCountSlots> & {
currentIndex: number;
totalPages: number;
renderPageCount: TeachingPopoverCarouselPageCountRenderFunction;
};

// @public
export type TeachingPopoverCarouselProps = ComponentProps<TeachingPopoverCarouselSlots> & {
defaultValue?: string;
value?: string;
onPageChange?: EventHandler<CarouselPageChangeData>;
onFinish?: EventHandler<CarouselPageChangeData>;
};

// @public (undocumented)
export type TeachingPopoverCarouselSlots = {
root: NonNullable<Slot<'div'>>;
footer: NonNullable<Slot<'div'>>;
previous: Slot<typeof Button>;
next: NonNullable<Slot<typeof Button>>;
nav: Slot<TeachingPopoverCarouselNavProps>;
pageCount: Slot<'div'>;
};

// @public
export type TeachingPopoverCarouselState = ComponentState<TeachingPopoverCarouselSlots> & {
totalPages: number;
setCurrentPage: (page: number) => void;
} & Partial<Pick<PopoverContextValue, 'appearance'>> & Pick<TeachingPopoverCarouselProps, 'layout' | 'onPageChange'> & Required<Pick<TeachingPopoverCarouselProps, 'currentPage'>>;
export type TeachingPopoverCarouselState = ComponentState<Required<TeachingPopoverCarouselSlots>> & Partial<Pick<PopoverContextValue, 'appearance'>> & CarouselContextValue;

// @public
export const TeachingPopoverFooter: ForwardRefComponent<TeachingPopoverFooterProps>;
Expand All @@ -174,9 +255,7 @@ export const TeachingPopoverFooter: ForwardRefComponent<TeachingPopoverFooterPro
export const teachingPopoverFooterClassNames: SlotClassNames<TeachingPopoverFooterSlots>;

// @public (undocumented)
export type TeachingPopoverFooterProps = ComponentProps<Partial<TeachingPopoverFooterSlots>> & {
strings: TeachingPopoverFooterStrings;
} & Pick<TeachingPopoverFooterState, 'footerLayout'>;
export type TeachingPopoverFooterProps = ComponentProps<TeachingPopoverFooterSlots> & Pick<TeachingPopoverFooterState, 'footerLayout'>;

// @public (undocumented)
export type TeachingPopoverFooterState = ComponentState<TeachingPopoverFooterSlots> & Pick<PopoverContextValue, 'appearance'> & {
Expand Down Expand Up @@ -265,24 +344,45 @@ export const useTeachingPopoverBodyStyles_unstable: (state: TeachingPopoverBodyS
// @public (undocumented)
export const useTeachingPopoverCarousel_unstable: (props: TeachingPopoverCarouselProps, ref: React_2.Ref<HTMLDivElement>) => TeachingPopoverCarouselState;

// @public (undocumented)
export const useTeachingPopoverCarouselContext_unstable: <T>(selector: ContextSelector<TeachingPopoverCarouselContextValue, T>) => T;
// @public
export const useTeachingPopoverCarouselCard_unstable: (props: TeachingPopoverCarouselCardProps, ref: React_2.Ref<HTMLDivElement>) => TeachingPopoverCarouselCardState;

// @public
export const useTeachingPopoverCarouselCardStyles_unstable: (state: TeachingPopoverCarouselCardState) => TeachingPopoverCarouselCardState;

// @public (undocumented)
export function useTeachingPopoverCarouselContextValues_unstable(state: TeachingPopoverCarouselState): TeachingPopoverCarouselContextValues;

// @public (undocumented)
export const useTeachingPopoverCarouselFooter_unstable: (props: TeachingPopoverCarouselFooterProps, ref: React_2.Ref<HTMLDivElement>) => TeachingPopoverCarouselFooterState;

// @public
export const useTeachingPopoverCarouselFooterButton_unstable: (props: TeachingPopoverCarouselFooterButtonProps, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => TeachingPopoverCarouselFooterButtonState;

// @public
export const useTeachingPopoverCarouselFooterButtonStyles_unstable: (state: TeachingPopoverCarouselFooterButtonState) => TeachingPopoverCarouselFooterButtonState;

// @public
export const useTeachingPopoverCarouselFooterStyles_unstable: (state: TeachingPopoverCarouselFooterState) => TeachingPopoverCarouselFooterState;

// @public
export const useTeachingPopoverCarouselNav_unstable: (props: TeachingPopoverCarouselNavProps, ref: React_2.Ref<HTMLDivElement>) => TeachingPopoverCarouselNavState;

// @public
export const useTeachingPopoverCarouselNavButton_unstable: (props: TeachingPopoverCarouselNavButtonProps, ref: React_2.Ref<HTMLAnchorElement | HTMLButtonElement>) => TeachingPopoverCarouselNavButtonState;
export const useTeachingPopoverCarouselNavButton_unstable: (props: TeachingPopoverCarouselNavButtonProps, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => TeachingPopoverCarouselNavButtonState;

// @public
export const useTeachingPopoverCarouselNavButtonStyles_unstable: (state: TeachingPopoverCarouselNavButtonState) => TeachingPopoverCarouselNavButtonState;

// @public
export const useTeachingPopoverCarouselNavStyles_unstable: (state: TeachingPopoverCarouselNavState) => TeachingPopoverCarouselNavState;

// @public
export const useTeachingPopoverCarouselPageCount_unstable: (props: TeachingPopoverCarouselPageCountProps, ref: React_2.Ref<HTMLDivElement>) => TeachingPopoverCarouselPageCountState;

// @public
export const useTeachingPopoverCarouselPageCountStyles_unstable: (state: TeachingPopoverCarouselPageCountState) => TeachingPopoverCarouselPageCountState;

// @public
export const useTeachingPopoverCarouselStyles_unstable: (state: TeachingPopoverCarouselState) => TeachingPopoverCarouselState;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
"@fluentui/react-tabster": "^9.19.6",
"@fluentui/react-icons": "^2.0.224",
"@fluentui/react-aria": "^9.10.3",
"@fluentui/react-context-selector": "^9.1.57"
"@fluentui/react-context-selector": "^9.1.57",
"use-sync-external-store": "^1.2.0",
"@types/use-sync-external-store": "^0.0.6"
Mitch-At-Work marked this conversation as resolved.
Show resolved Hide resolved
},
"peerDependencies": {
"@types/react": ">=16.8.0 <19.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './components/TeachingPopoverCarouselCard/index';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './components/TeachingPopoverCarouselFooter/index';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './components/TeachingPopoverCarouselFooterButton/index';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './components/TeachingPopoverCarouselPageCount/index';
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';

export type TeachingPopoverBodyMediaLength = 'short' | 'medium' | 'tall';

export type TeachingPopoverBodySlots = {
/**
* The element wrapping the buttons.
Expand All @@ -14,8 +12,8 @@ export type TeachingPopoverBodySlots = {
};

export type TeachingPopoverBodyProps = ComponentProps<TeachingPopoverBodySlots> & {
mediaLength?: TeachingPopoverBodyMediaLength;
mediaLength?: 'short' | 'medium' | 'tall';
};

export type TeachingPopoverBodyState = ComponentState<TeachingPopoverBodySlots> &
Partial<Pick<TeachingPopoverBodyProps, 'mediaLength'>>;
Required<Pick<TeachingPopoverBodyProps, 'mediaLength'>>;
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,22 @@ export const useMediaStyles = makeStyles({
display: 'flex',
},
short: {
aspectRatio: 288 / 117,
'@supports not (aspect-ratio)': {
height: '117px',
},
'@supports (aspect-ratio)': {
aspectRatio: 288 / 117,
},
},
medium: {
aspectRatio: 288 / 176,
'@supports not (aspect-ratio)': {
height: '176px',
},
'@supports (aspect-ratio)': {
aspectRatio: 288 / 176,
},
},
tall: {
aspectRatio: 288 / 288,
'@supports not (aspect-ratio)': {
height: '288px',
},
'@supports (aspect-ratio)': {
aspectRatio: 288 / 288,
},
},
});

Expand All @@ -53,7 +47,7 @@ const useStyles = makeStyles({

/** Applies style classnames to slots */
export const useTeachingPopoverBodyStyles_unstable = (state: TeachingPopoverBodyState) => {
const { mediaLength = 'medium' } = state;
const { mediaLength } = state;
const styles = useStyles();
const mediaStyles = useMediaStyles();

Expand Down
Loading
Loading