Skip to content

Commit

Permalink
fix: extension onboarding ui/ux (#3639)
Browse files Browse the repository at this point in the history
  • Loading branch information
sshanzel authored Oct 8, 2024
1 parent 0950fc8 commit 4b79ce9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/extension/src/newtab/KeepItOverlay.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ReactElement, useCallback, useEffect, useRef } from 'react';
import {
DailyIcon,
StraightArrowIcon,
LongArrowIcon,
} from '@dailydotdev/shared/src/components/icons';
import { IconSize } from '@dailydotdev/shared/src/components/Icon';
import {
Expand All @@ -24,6 +24,8 @@ interface KeepItOverlayProps {
onClose: () => void;
}

const TEN_SECONDS = 10000;

export function KeepItOverlay({ onClose }: KeepItOverlayProps): ReactElement {
const { logEvent } = useLogContext();
const timeoutRef = useRef<ReturnType<typeof window.setTimeout>>();
Expand Down Expand Up @@ -52,7 +54,7 @@ export function KeepItOverlay({ onClose }: KeepItOverlayProps): ReactElement {
useEffect(() => {
timeoutRef.current = setTimeout(() => {
onClick();
}, 5000);
}, TEN_SECONDS);
}, [onClick]);

return (
Expand All @@ -69,13 +71,13 @@ export function KeepItOverlay({ onClose }: KeepItOverlayProps): ReactElement {
ALREADY DID THAT!
</Button>
<div className="absolute ml-16 mt-8 flex translate-y-full flex-col">
<StraightArrowIcon
<LongArrowIcon
size={IconSize.XXXLarge}
className="z-3 rotate-180 text-brand-subtler"
className="z-3 h-[7rem] animate-bounce"
/>
<span className="absolute right-0 top-[80%] flex min-w-[20rem] flex-row items-center gap-2 rounded-12 bg-surface-primary p-3">
<span className="rounded-full bg-surface-invert p-1">
<DailyIcon />
<span className="absolute right-0 top-[80%] flex min-w-[21.25rem] flex-row items-center gap-2 rounded-12 bg-surface-primary p-3">
<span className="rounded-full bg-surface-invert">
<DailyIcon secondary className="w-full" size={IconSize.XLarge} />
</span>
<span className="ml-1 flex flex-col text-surface-invert">
<Typography type={TypographyType.Footnote}>
Expand Down
3 changes: 3 additions & 0 deletions packages/shared/src/components/icons/Arrow/Long/filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/shared/src/components/icons/Arrow/Long/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React, { ReactElement } from 'react';
import Icon, { IconProps } from '../../../Icon';
import FilledIcon from './filled.svg';

export const LongArrowIcon = (props: IconProps): ReactElement => (
<Icon {...props} IconPrimary={FilledIcon} IconSecondary={FilledIcon} />
);
1 change: 1 addition & 0 deletions packages/shared/src/components/icons/Arrow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ export const ArrowIcon = (props: IconProps): ReactElement => (
<Icon {...props} IconPrimary={OutlinedIcon} IconSecondary={FilledIcon} />
);

export * from './Long';
export * from './Straight';
export * from './Triangle';

0 comments on commit 4b79ce9

Please sign in to comment.