diff --git a/public/icons/globe.svg b/public/icons/globe.svg new file mode 100644 index 00000000..59e83da9 --- /dev/null +++ b/public/icons/globe.svg @@ -0,0 +1,3 @@ + diff --git a/public/icons/help_circle.svg b/public/icons/help_circle.svg new file mode 100644 index 00000000..3b1dd7ce --- /dev/null +++ b/public/icons/help_circle.svg @@ -0,0 +1,5 @@ + diff --git a/public/icons/logout.svg b/public/icons/logout.svg new file mode 100644 index 00000000..b1dc8f00 --- /dev/null +++ b/public/icons/logout.svg @@ -0,0 +1,3 @@ + diff --git a/public/icons/message_square.svg b/public/icons/message_square.svg new file mode 100644 index 00000000..c3424a90 --- /dev/null +++ b/public/icons/message_square.svg @@ -0,0 +1,3 @@ + diff --git a/public/icons/settings.svg b/public/icons/settings.svg new file mode 100644 index 00000000..cdbed0ef --- /dev/null +++ b/public/icons/settings.svg @@ -0,0 +1,11 @@ + diff --git a/public/icons/user.svg b/public/icons/user.svg new file mode 100644 index 00000000..5ddff3dc --- /dev/null +++ b/public/icons/user.svg @@ -0,0 +1,4 @@ + diff --git a/public/icons/withdraw_x.svg b/public/icons/withdraw_x.svg new file mode 100644 index 00000000..a0dc3ca9 --- /dev/null +++ b/public/icons/withdraw_x.svg @@ -0,0 +1,5 @@ + diff --git a/src/app/account/_components/LanguageDropdown.css.ts b/src/app/account/_components/LanguageDropdown.css.ts new file mode 100644 index 00000000..faec5db9 --- /dev/null +++ b/src/app/account/_components/LanguageDropdown.css.ts @@ -0,0 +1,58 @@ +import { style } from '@vanilla-extract/css'; +import { vars } from '@/styles/theme.css'; +import * as fonts from '@/styles/font.css'; + +export const container = style({ + position: 'relative', +}); + +export const triggerDiv = style([ + fonts.labelMedium, + { + width: 172, + height: 36, + padding: '6px 12px', + + display: 'flex', + alignItems: 'center', + justifyContent: 'space-between', + + color: vars.color.gray9, + + border: `2px solid ${vars.color.gray7}`, + borderRadius: 8, + }, +]); + +export const menuDiv = style([ + fonts.labelMedium, + { + width: 172, + padding: '8px 0', + + position: 'absolute', + + color: vars.color.gray9, + + border: `2px solid ${vars.color.gray7}`, + borderTop: 'none', + borderRadius: '0px 0px 8px 8px', + }, +]); + +export const listDiv = style([ + fonts.labelMedium, + { + padding: '8px 16px', + + selectors: { + '&:hover': { + backgroundColor: vars.color.lightblue, + }, + }, + }, +]); + +export const selected = style({ + color: vars.color.blue, +}); diff --git a/src/app/account/_components/LanguageDropdown.tsx b/src/app/account/_components/LanguageDropdown.tsx new file mode 100644 index 00000000..1bf949c4 --- /dev/null +++ b/src/app/account/_components/LanguageDropdown.tsx @@ -0,0 +1,43 @@ +import { useState } from 'react'; +import * as styles from './LanguageDropdown.css'; +import useBooleanOutput from '@/hooks/useBooleanOutput'; +import useOnClickOutside from '@/hooks/useOnClickOutside'; + +export default function LanguageDropdown() { + const { isOn, toggle, handleSetOff } = useBooleanOutput(); + const { ref } = useOnClickOutside(handleSetOff); + const [language, setLanguage] = useState<'ko' | 'en'>('ko'); + + const handleSelectLanguage = (language: 'ko' | 'en') => { + setLanguage(language); + handleSetOff(); + }; + + return ( +