-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add & update ad components, test banner images
- Loading branch information
1 parent
b9dd100
commit ea20ca6
Showing
7 changed files
with
54 additions
and
15 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,12 @@ | ||
import { Button, ButtonProps } from '@pancakeswap/uikit' | ||
import { PropsWithChildren } from 'react' | ||
|
||
interface AdButtonProps extends ButtonProps, PropsWithChildren {} | ||
|
||
export const AdButton = ({ children }: AdButtonProps) => { | ||
return ( | ||
<Button scale="sm" variant="subtle" padding="3px 4px 5px 4px" height="unset"> | ||
{children} | ||
</Button> | ||
) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { Text, TextProps } from '@pancakeswap/uikit' | ||
import { PropsWithChildren } from 'react' | ||
|
||
interface TitleProps extends TextProps {} | ||
interface TitleProps extends TextProps, PropsWithChildren {} | ||
|
||
export const Title = (props: TitleProps) => { | ||
export const Title = ({ children, ...props }: TitleProps) => { | ||
return ( | ||
<Text color="textSubtle" {...props}> | ||
AdPanel | ||
<Text fontSize="14px" mb="16px" bold {...props}> | ||
{children} | ||
</Text> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,5 +1,13 @@ | ||
import { AdButton } from '../Button' | ||
import { AdCard } from '../Card' | ||
import { Title } from '../Title' | ||
|
||
export const TitleAd = () => { | ||
return <AdCard imageUrl="https://placehold.co/207x188" /> | ||
return ( | ||
<AdCard imageUrl="/images/adpanel-test/bannerImg1.png"> | ||
<Title>Enjoy Gas-Free Transactions on zkSync PancakeSwap</Title> | ||
|
||
<AdButton>Quick start</AdButton> | ||
</AdCard> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import { AdButton as Button } from './Button' | ||
import { AdCard as Card } from './Card' | ||
import { DesktopCard, MobileCard } from './CardLayouts' | ||
import { Title } from './Title' | ||
|
||
// TODO: Later move to widgets-internal with conventional exporting | ||
export const AdPanel = { | ||
DesktopCard, | ||
MobileCard, | ||
Card, | ||
Title, | ||
Button, | ||
} |