-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from boostcampwm-2024/Feature/#080_panda_css_๋ผโฆ
โฆ์ด๋ธ๋ฌ๋ฆฌ_์ค์ Feature/#80 panda css ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์
- Loading branch information
Showing
40 changed files
with
2,297 additions
and
159 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,7 @@ dist-ssr | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
## Panda | ||
styled-system | ||
styled-system-studio |
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,30 @@ | ||
import { defineConfig } from "@pandacss/dev"; | ||
import { radii } from "@styles/tokens/radii"; | ||
import { colors } from "@styles/tokens/color"; | ||
import { shadows } from "@styles/tokens/shadow"; | ||
import { spacing } from "@styles/tokens/spacing"; | ||
import { textStyles } from "@styles/typography"; | ||
import { globalStyles } from "@styles/global"; | ||
import { glassContainerRecipe } from "@styles/recipes/glassContainerRecipe"; | ||
|
||
export default defineConfig({ | ||
preflight: true, | ||
include: ["./src/**/*.{js,jsx,ts,tsx}", "./pages/**/*.{js,jsx,ts,tsx}"], | ||
exclude: [], | ||
globalCss: globalStyles, | ||
theme: { | ||
extend: { | ||
tokens: { | ||
colors, | ||
radii, | ||
shadows, | ||
spacing, | ||
}, | ||
recipes: { | ||
glassContainer: glassContainerRecipe, | ||
}, | ||
textStyles, | ||
}, | ||
}, | ||
outdir: "styled-system", | ||
}); |
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,5 @@ | ||
module.exports = { | ||
plugins: { | ||
'@pandacss/dev/postcss': {}, | ||
}, | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
client/src/components/bottomNavigator/BottomNavigator.style.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,24 @@ | ||
import { css, cx } from "@styled-system/css"; | ||
import { glassContainer } from "@styled-system/recipes"; | ||
|
||
export const bottomNavigatorContainer = cx( | ||
glassContainer({ | ||
borderRadius: "top", | ||
}), | ||
css({ | ||
display: "flex", | ||
zIndex: 1000, | ||
position: "fixed", | ||
left: "50%", | ||
bottom: 0, | ||
transform: "translateX(-50%)", | ||
gap: "lg", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
minWidth: "360px", | ||
height: "88px", | ||
padding: "sm", | ||
paddingBottom: "lg", | ||
background: "white/60", | ||
}), | ||
); |
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,30 @@ | ||
import { IconButton } from "@components/button/IconButton"; | ||
import { bottomNavigatorContainer } from "./BottomNavigator.style"; | ||
|
||
interface NavItem { | ||
id: number; | ||
icon: string; | ||
} | ||
|
||
export const BottomNavigator = () => { | ||
const items: NavItem[] = [ | ||
{ | ||
id: 1, | ||
icon: "๐ ", | ||
}, | ||
{ | ||
id: 2, | ||
icon: "๐", | ||
}, | ||
{ | ||
id: 3, | ||
icon: "๐", | ||
}, | ||
]; | ||
|
||
return ( | ||
<div className={bottomNavigatorContainer}> | ||
{items?.map(({ id, icon }) => <IconButton icon={icon} key={id} size="md" />)} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { cva } from "@styled-system/css"; | ||
|
||
export const iconButtonContainer = cva({ | ||
base: { | ||
display: "flex", | ||
|
||
justifyContent: "center", | ||
alignItems: "center", | ||
borderRadius: "xs", | ||
background: "white", | ||
"&:hover": { | ||
cursor: "pointer", | ||
}, | ||
}, | ||
variants: { | ||
size: { | ||
sm: { | ||
width: "44px", | ||
height: "44px", | ||
boxShadow: "sm", | ||
}, | ||
md: { | ||
width: "52px", | ||
height: "52px", | ||
boxShadow: "md", | ||
}, | ||
}, | ||
}, | ||
defaultVariants: { | ||
size: "md", | ||
}, | ||
}); | ||
|
||
export const iconBox = cva({ | ||
variants: { | ||
size: { | ||
sm: { | ||
fontSize: "24px", | ||
}, | ||
md: { | ||
fontSize: "30px", | ||
}, | ||
}, | ||
}, | ||
defaultVariants: { | ||
size: "md", | ||
}, | ||
}); |
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,16 @@ | ||
import { iconButtonContainer, iconBox } from "./IconButton.style"; | ||
|
||
interface IconButtonProps { | ||
icon: string; | ||
size: "sm" | "md"; | ||
onClick?: () => void; | ||
} | ||
|
||
export const IconButton = ({ icon, size, onClick }: IconButtonProps) => { | ||
// TODO ์ถํ svg ํ์ผ์ ๋ฐ์์ฌ ์ ์๋๋ก ์์ (์ฌ์ด๋๋ฐ - ํ์ด์ง ์ถ๊ฐ ๋ฒํผ) | ||
return ( | ||
<button className={iconButtonContainer({ size })} onClick={onClick}> | ||
<span className={iconBox({ size })}>{icon}</span> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { css } from "@styled-system/css"; | ||
|
||
export const menuItemWrapper = css({ | ||
display: "flex", | ||
gap: "lg", | ||
alignItems: "center", | ||
borderRightRadius: "md", | ||
width: "300px", | ||
padding: "md", | ||
boxShadow: "sm", | ||
}); | ||
|
||
export const imageBox = css({ | ||
borderRadius: "sm", | ||
width: "50px", | ||
height: "50px", | ||
overflow: "hidden", | ||
}); | ||
|
||
export const textBox = css({ | ||
textStyle: "display-medium20", | ||
color: "gray.900", | ||
}); |
Oops, something went wrong.