-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create layouts with design and basic setup (#2085)
* feat: basic app setup and create layouts with design * feat: move global styling to globals * feat: use react-router links in header * fix: move routes to correct layout
- Loading branch information
1 parent
8e2a297
commit f68ba2b
Showing
21 changed files
with
166 additions
and
71 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
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
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,27 @@ | ||
import { atoms, vars } from '@kadena/react-ui/styles'; | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
const minHeaderHeight = '90px'; | ||
|
||
export const headerStyle = style({ | ||
borderBottom: `1px solid ${vars.colors.$layoutSurfaceCard}`, | ||
minHeight: minHeaderHeight, | ||
}); | ||
|
||
export const mainStyle = style([ | ||
atoms({ | ||
width: '100%', | ||
}), | ||
{ | ||
minHeight: `calc(100vh - ${minHeaderHeight})`, | ||
background: 'transparent', // fallback in case radial-gradient is not working | ||
backgroundImage: 'radial-gradient(circle farthest-side at 50% 170%, #42CEA0, transparent 75%)', | ||
backgroundRepeat: 'no-repeat', | ||
}, | ||
]); | ||
|
||
export const containerStyle = style({ | ||
maxWidth: '500px', | ||
margin: '0 auto', | ||
textAlign: 'center', | ||
}); |
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 { | ||
KadenaLogo, | ||
Stack, | ||
Text, | ||
} from '@kadena/react-ui'; | ||
import { FC } from 'react'; | ||
import { Link, Outlet } from 'react-router-dom'; | ||
import { headerStyle, mainStyle, containerStyle } from './layout-mini.css'; | ||
|
||
export const LayoutMini: FC = () => { | ||
return ( | ||
<> | ||
<Stack | ||
as="header" | ||
alignItems="center" | ||
flexDirection="row" | ||
gap="md" | ||
justifyContent="space-between" | ||
padding="lg" | ||
className={headerStyle} | ||
> | ||
<Link to="/"> | ||
<KadenaLogo height={40} /> | ||
</Link> | ||
<Text>Go to <Link to="https://www.kadena.io/" target="_blank">kadena.io</Link></Text> | ||
</Stack> | ||
<main className={mainStyle}> | ||
<div className={containerStyle}> | ||
<Outlet /> | ||
</div> | ||
</main> | ||
<div id="modalportal"></div> | ||
</> | ||
); | ||
}; |
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,8 @@ | ||
|
||
import '@kadena/react-ui/global'; | ||
import { globalStyle } from '@vanilla-extract/css'; | ||
import { tokens } from '@kadena/react-ui/styles'; | ||
|
||
globalStyle('body', { | ||
backgroundColor: tokens.kda.foundation.color.neutral.n1, | ||
}); |
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
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,6 +0,0 @@ | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
export const layout = style({ | ||
width: 800, | ||
margin: '0 auto', | ||
}); | ||
Oops, something went wrong.