Skip to content

Commit

Permalink
fix(uitkit): Menu height css (#5088)
Browse files Browse the repository at this point in the history
* fix(uitkit): Menu height css

* remove comment

* fix(web): Add missing local packages

* update snapshot
  • Loading branch information
0xjojoex authored Oct 26, 2022
1 parent c18ef20 commit 877117a
Show file tree
Hide file tree
Showing 12 changed files with 3,182 additions and 2,517 deletions.
21 changes: 7 additions & 14 deletions apps/aptos/components/Layout/ExchangeLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
import { Image, Swap } from '@pancakeswap/uikit'
import { usePhishingBanner } from 'state/user/phishingBanner'
import NoSSR from 'components/NoSSR'

export const ExchangeLayout = ({ children }: React.PropsWithChildren) => {
const [showPhishingBanner] = usePhishingBanner()

return (
<NoSSR>
<Swap.Page
helpUrl="https://docs.pancakeswap.finance/get-started-aptos"
isEvm={false}
helpImage={<Image src="/help.png" width={178} height={243} />}
hasWarningBanner={showPhishingBanner}
>
{children}
</Swap.Page>
</NoSSR>
<Swap.Page
helpUrl="https://docs.pancakeswap.finance/get-started-aptos"
isEvm={false}
helpImage={<Image src="/help.png" width={178} height={243} />}
>
{children}
</Swap.Page>
)
}
7 changes: 7 additions & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@
"wagmi": "^0.6.7",
"@pancakeswap/wagmi": "*",
"@pancakeswap/sdk": "*",
"@pancakeswap/uikit": "*",
"@pancakeswap/farms": "*",
"@pancakeswap/localization": "*",
"@pancakeswap/hooks": "*",
"@pancakeswap/multicall": "*",
"@pancakeswap/token-lists": "*",
"@pancakeswap/utils": "*",
"@pancakeswap/tokens": "*"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/components/Layout/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useCakeBusdPrice } from 'hooks/useBUSDPrice'
import Container from './Container'

const StyledPage = styled(Container)`
width: 100%;
min-height: calc(100vh - 64px);
padding-top: 16px;
padding-bottom: 16px;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/views/Swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function Swap() {

return (
<Page removePadding={isChartExpanded} hideFooterOnDesktop={isChartExpanded}>
<Flex width="100%" justifyContent="center" position="relative">
<Flex width={['328px', , '100%']} justifyContent="center" position="relative">
{!isMobile && isChartSupported && (
<PriceChartContainer
inputCurrencyId={inputCurrencyId}
Expand Down
5 changes: 3 additions & 2 deletions packages/ui/css/sprinkles.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const extendedSpace = {
} as const

const margin = { ...vars.space, auto: 'auto' }
const extendedHeight = { '100vh': '100vh' }

const responsiveProperties = defineProperties({
conditions: {
Expand Down Expand Up @@ -56,7 +57,7 @@ const responsiveProperties = defineProperties({
justifyItems: [...flexAlignment, 'space-around', 'space-between'],
justifySelf: [...flexAlignment],
inset: { ...vars.space, ...negativeSpace },
height: { ...vars.space, ...extendedSpace },
height: { ...vars.space, ...extendedSpace, ...extendedHeight },
left: { ...vars.space, ...negativeSpace },
marginBottom: { ...margin, ...negativeSpace },
marginLeft: { ...margin, ...negativeSpace },
Expand All @@ -70,7 +71,7 @@ const responsiveProperties = defineProperties({
...extendedSpace,
none: 'none',
},
minHeight: vars.space,
minHeight: { ...vars.space, ...extendedSpace, ...extendedHeight },
minWidth: vars.space,
paddingBottom: vars.space,
paddingLeft: vars.space,
Expand Down
2 changes: 1 addition & 1 deletion packages/uikit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@types/react-router-dom": "^5.1.7",
"@vanilla-extract/vite-plugin": "^3.3.1",
"@vanilla-extract/vite-plugin": "^3.6.1",
"babel-jest": "^27.5.1",
"babel-loader": "^8.2.2",
"babel-plugin-styled-components": "^1.12.0",
Expand Down
Loading

1 comment on commit 877117a

@vercel
Copy link

@vercel vercel bot commented on 877117a Oct 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

aptos-web – ./apps/aptos

aptos.pancake.run
aptos-web-git-develop.pancake.run
aptos.pancakeswap.finance
aptos-web.pancake.run

Please sign in to comment.