Skip to content

Commit

Permalink
feat: 강의 코드 복사 button UI 작업 #68
Browse files Browse the repository at this point in the history
- 강의 코드 복사 버튼의 UI 작업을 완료했습니다.
  • Loading branch information
LellowMellow committed Nov 28, 2023
1 parent c69f1d3 commit d224ab2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import HeaderInstructorControls from "./components/HeaderInstructorControls";
import HeaderParticipantControls from "./components/HeaderParticipantControls";
import HeaderProfileButton from "./components/HeaderProfileButton";
import HeaderSettingButton from "./components/HeaderSettingButton";
import HeaderCodeCopyButton from "./components/HeaderCodeCopyButton";

interface HeaderProps {
type: "login" | "main" | "instructor" | "participant";
Expand All @@ -19,7 +20,12 @@ const Header = ({ type }: HeaderProps) => {
<header className="flex w-100 relative items-center justify-between px-6 py-4 bg-white border-header box-border z-10">
<div className="flex items-center gap-4 semibold-20">
{(type === "login" || type === "main") && <HeaderLogo type="normal" />}
{(type === "instructor" || type === "participant") && <HeaderLogo type="lecture" />}
{(type === "instructor" || type === "participant") && (
<>
<HeaderLogo type="lecture" />
<HeaderCodeCopyButton lectureCode="000000" />
</>
)}
</div>

<div className="flex items-center gap-4 semibold-20">
Expand Down
17 changes: 17 additions & 0 deletions frontend/src/components/Header/components/HeaderCodeCopyButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import SmallButton from "@/components/SmallButton/SmallButton";
import ShareIcon from "@/assets/svgs/share.svg?react";

interface HeaderCodeCopyButtonProps {
lectureCode: string;
}

const HeaderCodeCopyButton = ({ lectureCode }: HeaderCodeCopyButtonProps) => {
return (
<SmallButton onClick={() => console.log("clicked")} className="bg-grayscale-lightgray">
<ShareIcon className="fill-grayscale-black" />
{lectureCode}
</SmallButton>
);
};

export default HeaderCodeCopyButton;

0 comments on commit d224ab2

Please sign in to comment.