-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(extension): add midnight pre-launch settings banner [LW-10398]
- Loading branch information
1 parent
ed79fcb
commit 8b83c82
Showing
12 changed files
with
117 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+81.4 KB
packages/core/src/ui/assets/images/midnight-launch-event-sidebar-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
...ui/components/MidnightPreLaunchSettingsBanner/MidnightPreLaunchSettingsBanner.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.card { | ||
background-image: var(--midnight-pre-launch-banner-image); | ||
background-size: cover; | ||
background-position: center right; | ||
padding: 30px 20px 30px 20px; | ||
} | ||
|
||
.heading { | ||
color: white; | ||
font-size: 18px; | ||
line-height: 24px; | ||
margin-bottom: 10px; | ||
font-weight: 700; | ||
} | ||
|
||
.description { | ||
color: #A9A9A9; | ||
font-size: 16px; | ||
line-height: 24px; | ||
font-weight: 500; | ||
margin-bottom: 30px; | ||
} |
35 changes: 35 additions & 0 deletions
35
...ui/components/MidnightPreLaunchSettingsBanner/MidnightPreLaunchSettingsBanner.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import type { Meta } from '@storybook/react'; | ||
import { action } from '@storybook/addon-actions'; | ||
|
||
import { Box } from '@lace/ui'; | ||
|
||
import { MidnightPreLaunchSettingsBanner } from './index'; | ||
import MidnightPreLaunchBannerImage from '../../assets/images/midnight-launch-event-sidebar-banner.png'; | ||
|
||
export default { | ||
title: 'Midnight/MidnightPreLaunchSettingsBanner' | ||
} as Meta<typeof MidnightPreLaunchSettingsBanner>; | ||
|
||
export const Overview = (): JSX.Element => ( | ||
<> | ||
<Box w="$312"> | ||
<MidnightPreLaunchSettingsBanner | ||
bannerImageUrl={MidnightPreLaunchBannerImage} | ||
onCtaButtonClick={action('onCtaButtonClick')} | ||
/> | ||
</Box> | ||
<Box w="$342"> | ||
<MidnightPreLaunchSettingsBanner | ||
bannerImageUrl={MidnightPreLaunchBannerImage} | ||
onCtaButtonClick={action('onCtaButtonClick')} | ||
/> | ||
</Box> | ||
<Box w="$420"> | ||
<MidnightPreLaunchSettingsBanner | ||
bannerImageUrl={MidnightPreLaunchBannerImage} | ||
onCtaButtonClick={action('onCtaButtonClick')} | ||
/> | ||
</Box> | ||
</> | ||
); |
28 changes: 28 additions & 0 deletions
28
...ore/src/ui/components/MidnightPreLaunchSettingsBanner/MidnightPreLaunchSettingsBanner.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
import { Button, Card } from '@lace/ui'; | ||
import { useTranslation } from 'react-i18next'; | ||
import styles from './MidnightPreLaunchSettingsBanner.module.scss'; | ||
|
||
export const MidnightPreLaunchSettingsBanner = ({ | ||
bannerImageUrl, | ||
onCtaButtonClick | ||
}: { | ||
bannerImageUrl: string; | ||
onCtaButtonClick?: () => void; | ||
}): React.ReactElement => { | ||
const { t } = useTranslation(); | ||
return ( | ||
<Card.Outlined | ||
className={styles.card} | ||
style={{ '--midnight-pre-launch-banner-image': `url(${bannerImageUrl})` } as React.CSSProperties} | ||
> | ||
<div className={styles.heading}>{t('core.MidnightPreLaunchSettingsBanner.heading')}</div> | ||
<div className={styles.description}>{t('core.MidnightPreLaunchSettingsBanner.description')}</div> | ||
<Button.CallToAction | ||
label={t('core.MidnightPreLaunchSettingsBanner.ctaButtonLabel')} | ||
onClick={onCtaButtonClick} | ||
w="$fill" | ||
/> | ||
</Card.Outlined> | ||
); | ||
}; |
1 change: 1 addition & 0 deletions
1
packages/core/src/ui/components/MidnightPreLaunchSettingsBanner/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { MidnightPreLaunchSettingsBanner } from './MidnightPreLaunchSettingsBanner'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters