-
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.
- Loading branch information
Showing
32 changed files
with
807 additions
and
130 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
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
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
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 "@styled-system/css"; | ||
|
||
export const container = css({ | ||
display: "flex", | ||
gap: "4", | ||
flexDirection: "column", | ||
}); | ||
|
||
export const title = css({ | ||
color: "gray.700", | ||
fontSize: "lg", | ||
fontWeight: "medium", | ||
}); | ||
|
||
export const input = css({ | ||
borderColor: "gray.200", | ||
borderRadius: "md", | ||
borderWidth: "1px", | ||
width: "full", | ||
paddingY: "2", | ||
paddingX: "3", | ||
_focus: { | ||
outline: "none", | ||
borderColor: "blue.500", | ||
}, | ||
_hover: { | ||
borderColor: "gray.300", | ||
}, | ||
}); |
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,41 @@ | ||
import { useState } from "react"; | ||
import { container, title, input } from "./RenameModal.style"; | ||
import { Modal } from "./modal"; | ||
|
||
interface RenameModalProps { | ||
isOpen: boolean; | ||
onClose: () => void; | ||
onRename: (newName: string) => void; | ||
currentName: string; | ||
} | ||
|
||
export const RenameModal = ({ isOpen, onClose, onRename, currentName }: RenameModalProps) => { | ||
const [name, setName] = useState(currentName); | ||
|
||
const handleRename = () => { | ||
if (name.trim()) { | ||
onRename(name); | ||
onClose(); | ||
} | ||
}; | ||
|
||
return ( | ||
<Modal | ||
isOpen={isOpen} | ||
primaryButtonLabel="λ³κ²½νκΈ°" | ||
primaryButtonOnClick={handleRename} | ||
secondaryButtonLabel="μ·¨μ" | ||
secondaryButtonOnClick={onClose} | ||
> | ||
<div className={container}> | ||
<h2 className={title}>μν¬μ€νμ΄μ€ μ΄λ¦ λ³κ²½</h2> | ||
<input | ||
className={input} | ||
value={name} | ||
onChange={(e) => setName(e.target.value)} | ||
placeholder="μλ‘μ΄ μν¬μ€νμ΄μ€ μ΄λ¦" | ||
/> | ||
</div> | ||
</Modal> | ||
); | ||
}; |
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
Oops, something went wrong.