-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
69 additions
and
7 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
frontend-monorepo/packages/hanglog-admin/src/assets/svg/edit-icon.svg
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
29 changes: 29 additions & 0 deletions
29
...nd-monorepo/packages/hanglog-admin/src/components/city/CityEditMenu/CityEditMenu.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,29 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
import { Theme } from 'hang-log-design-system'; | ||
|
||
export const buttonStyling = css({ | ||
width: '20px', | ||
height: '20px', | ||
border: 'none', | ||
outline: 0, | ||
|
||
backgroundColor: 'transparent', | ||
|
||
cursor: 'pointer', | ||
|
||
'& svg': { | ||
width: '20px', | ||
height: '20px', | ||
}, | ||
}); | ||
|
||
export const editIconStyling = css({ | ||
'& path': { | ||
fill: Theme.color.gray600, | ||
}, | ||
|
||
'&:hover path': { | ||
fill: Theme.color.gray800, | ||
}, | ||
}); |
26 changes: 26 additions & 0 deletions
26
frontend-monorepo/packages/hanglog-admin/src/components/city/CityEditMenu/CityEditMenu.tsx
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,26 @@ | ||
import { useOverlay } from 'hang-log-design-system'; | ||
|
||
import CityAddModal from '../CityAddModal/CityAddModal'; | ||
|
||
import type { CityData } from '@/types/city'; | ||
|
||
import { buttonStyling, editIconStyling } from './CityEditMenu.style'; | ||
|
||
import EditIcon from '@assets/svg/edit-icon.svg?react'; | ||
|
||
const CityEditMenu = ({ ...information }: CityData) => { | ||
const { isOpen: isEditModalOpen, open: openEditModal, close: closeEditModal } = useOverlay(); | ||
|
||
return ( | ||
<> | ||
<button type="button" aria-label="도시 수정 버튼" onClick={openEditModal} css={buttonStyling}> | ||
<EditIcon css={editIconStyling} /> | ||
</button> | ||
{isEditModalOpen && ( | ||
<CityAddModal onClose={closeEditModal} cityId={information.id} initialData={information} /> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default CityEditMenu; |
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