Skip to content

Commit d29659f

Browse files
SiTaggartTheSisb
andauthored
fix: homepage static illustration and switch nav chevrons (#3040)
Co-authored-by: Shadi <[email protected]>
1 parent c3cfbdc commit d29659f

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

packages/paste-website/src/components/homepage/HomeHeroIllustration.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type {ValueOf} from '@twilio-paste/types';
44
import {useReducedMotion} from '@twilio-paste/animation-library';
55
import lottie from 'lottie-web';
66
import VisibilitySensor from 'react-visibility-sensor';
7+
import Image from 'next/future/image';
78

89
import HomeHeroIllu from '../../assets/illustrations/home_hero.svg';
910
import {inCypress} from '../../utils/inCypress';
@@ -18,7 +19,7 @@ type IllustrationStatesType = ValueOf<typeof IllustrationStates>;
1819
const IllustrationChildren: React.FC<{state: IllustrationStatesType}> = ({state}) => {
1920
switch (state) {
2021
case IllustrationStates.STATIC:
21-
return <HomeHeroIllu />;
22+
return <Image src={HomeHeroIllu} aria-hidden="true" role="img" alt="" fill />;
2223
// null for dynamic because lottie injects children
2324
case IllustrationStates.DYNAMIC:
2425
case IllustrationStates.UNINITIALIZED:
@@ -89,6 +90,7 @@ const HomeHeroIllustration: React.FC = () => {
8990
maxWidth="size70"
9091
height={['400px', '400px', '500px']}
9192
marginLeft="auto"
93+
position="relative"
9294
ref={containerRef}
9395
>
9496
<IllustrationChildren state={illustrationState} />

packages/paste-website/src/components/site-wrapper/sidebar/sidebar-disclosure/SidebarDisclosureButton.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import {Box} from '@twilio-paste/box';
33
import type {BoxProps, BoxStyleProps} from '@twilio-paste/box';
44
import {DisclosurePrimitive} from '@twilio-paste/disclosure-primitive';
5-
import {ChevronDisclosureExpandedIcon} from '@twilio-paste/icons/esm/ChevronDisclosureExpandedIcon';
5+
import {ChevronDisclosureIcon} from '@twilio-paste/icons/esm/ChevronDisclosureIcon';
66

77
import {SidebarDisclosureContext} from './SidebarDisclosureContext';
88

@@ -64,14 +64,10 @@ const StyledButton = React.forwardRef<HTMLButtonElement, SidebarDisclosureButton
6464
as="span"
6565
alignItems="center"
6666
display="flex"
67-
transform={props['aria-expanded'] ? 'rotate(0deg)' : 'rotate(-90deg)'}
67+
transform={props['aria-expanded'] ? 'rotate(90deg)' : 'rotate(0deg)'}
6868
transition="transform 100ms ease-out"
6969
>
70-
<ChevronDisclosureExpandedIcon
71-
color="colorTextIcon"
72-
decorative
73-
size={['sizeIcon40', 'sizeIcon40', 'sizeIcon10']}
74-
/>
70+
<ChevronDisclosureIcon color="colorTextIcon" decorative size={['sizeIcon40', 'sizeIcon40', 'sizeIcon10']} />
7571
</Box>
7672
<Box flexGrow={1}>{props.children}</Box>
7773
</Box>

0 commit comments

Comments
 (0)