-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Layout and MainContainer (#1489)
- Loading branch information
1 parent
a8c910a
commit ca68f9e
Showing
12 changed files
with
134 additions
and
186 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Sidebar from '../../legacy-components/Sidebar'; | ||
import Topbar from '../../legacy-components/Topbar'; | ||
import { StyledWrapper } from './Layout.styles'; | ||
|
||
interface Props { | ||
className?: string; | ||
children: React.ReactNode; | ||
} | ||
|
||
const Layout = ({ className, children }: Props): JSX.Element => ( | ||
<Sidebar className={className}> | ||
<StyledWrapper> | ||
<Topbar /> | ||
<main>{children}</main> | ||
</StyledWrapper> | ||
</Sidebar> | ||
); | ||
|
||
export { Layout }; |
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,24 +1 @@ | ||
import clsx from 'clsx'; | ||
|
||
import Sidebar from '../../legacy-components/Sidebar'; | ||
import Topbar from '../../legacy-components/Topbar'; | ||
import { MaintenanceBanner } from '../MaintenanceBanner'; | ||
|
||
interface Props { | ||
className?: string; | ||
children: React.ReactNode; | ||
} | ||
|
||
const Layout = ({ className, children }: Props): JSX.Element => { | ||
return ( | ||
<Sidebar className={className}> | ||
<div className={clsx('relative', 'min-h-screen')}> | ||
<MaintenanceBanner /> | ||
<Topbar /> | ||
{children} | ||
</div> | ||
</Sidebar> | ||
); | ||
}; | ||
|
||
export { Layout }; | ||
export { Layout } from './Layout'; |
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,29 @@ | ||
import styled from 'styled-components'; | ||
|
||
import { Flex, theme } from '@/component-library'; | ||
|
||
const StyledContainer = styled(Flex)` | ||
padding: ${theme.spacing.spacing4}; | ||
width: 100%; | ||
margin-left: auto; | ||
margin-right: auto; | ||
@media ${theme.breakpoints.up('sm')} { | ||
max-width: ${theme.breakpoints.values.sm}px; | ||
} | ||
@media ${theme.breakpoints.up('md')} { | ||
max-width: ${theme.breakpoints.values.md}px; | ||
} | ||
@media ${theme.breakpoints.up('lg')} { | ||
padding: ${theme.spacing.spacing6}; | ||
max-width: ${theme.breakpoints.values.lg}px; | ||
} | ||
@media ${theme.breakpoints.up('xl')} { | ||
max-width: ${theme.breakpoints.values.xl}px; | ||
} | ||
`; | ||
|
||
export { StyledContainer }; |
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,11 @@ | ||
import { FlexProps } from '@/component-library'; | ||
|
||
import { StyledContainer } from './MainContainer.styles'; | ||
|
||
type MainContainerProps = FlexProps; | ||
|
||
const MainContainer = ({ direction = 'column', gap = 'spacing8', ...props }: MainContainerProps): JSX.Element => ( | ||
<StyledContainer direction={direction} gap={gap} {...props} /> | ||
); | ||
|
||
export { MainContainer }; |
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 @@ | ||
import clsx from 'clsx'; | ||
|
||
const MainContainer = ({ className, ...rest }: React.ComponentPropsWithRef<'div'>): JSX.Element => ( | ||
<div className={clsx('p-4', 'lg:p-6', 'space-y-10', 'container', 'mx-auto', className)} {...rest} /> | ||
); | ||
|
||
export { MainContainer }; | ||
export { MainContainer } from './MainContainer'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
ca68f9e
There was a problem hiding this comment.
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:
interbtc-ui-interlay-testnet – ./
interbtc-ui-interlay-testnet.vercel.app
testnet.interlay.io
interbtc-ui-interlay-testnet-interlay.vercel.app
interbtc-ui-interlay-testnet-git-master-interlay.vercel.app
ca68f9e
There was a problem hiding this comment.
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:
interbtc-ui-kintsugi-testnet – ./
interbtc-ui-kintsugi-testnet-interlay.vercel.app
interbtc-ui-kintsugi-testnet-git-master-interlay.vercel.app
interbtc-ui.vercel.app
kintnet.interlay.io