메뉴얼 팝업 공통화 추가
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import { useHelpDialog } from "../../provider/help-dialog-context";
|
||||
|
||||
const PageTitle = ({
|
||||
title,
|
||||
@@ -7,23 +10,39 @@ const PageTitle = ({
|
||||
title: string;
|
||||
menuPaths: string[];
|
||||
}) => {
|
||||
const { openHelp } = useHelpDialog();
|
||||
return (
|
||||
<div className="flex w-full items-center justify-between px-[1.8rem] pt-[2rem]">
|
||||
<h2 className="text-[2.4rem] font-semibold text-title">{title}</h2>
|
||||
{menuPaths.length > 0 && (
|
||||
<div className="flex items-center gap-3">
|
||||
<i className="diveicon di-home-fill text-foreground" />
|
||||
{menuPaths?.map((path, i) => (
|
||||
<React.Fragment key={`${i}-${path}`}>
|
||||
{i !== 0 && (
|
||||
<i className="diveicon di-arrow-forward text-foreground" />
|
||||
)}
|
||||
<span className="text-xl text-foreground">{path}</span>
|
||||
</React.Fragment>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<div className="flex items-center gap-3">메뉴얼</div>
|
||||
<div className="flex items-center gap-3">
|
||||
<h2 className="text-[2.4rem] font-semibold text-title">{title}</h2>
|
||||
<button
|
||||
onClick={openHelp}
|
||||
className="flex items-center gap-3 cursor-pointer hover:opacity-80 transition-opacity"
|
||||
>
|
||||
<i className="diveicon di-question-circle text-red-500 text-2xl" />
|
||||
</button>
|
||||
</div>
|
||||
<div className="flex items-center gap-3">
|
||||
{menuPaths.length > 0 && (
|
||||
<div className="flex items-center gap-3">
|
||||
<i className="diveicon di-home-fill text-foreground" />
|
||||
{menuPaths?.map((path, i) => (
|
||||
<React.Fragment key={`${i}-${path}`}>
|
||||
{i !== 0 && (
|
||||
<i className="diveicon di-arrow-forward text-foreground" />
|
||||
)}
|
||||
<span className="text-xl text-foreground">{path}</span>
|
||||
</React.Fragment>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<button
|
||||
onClick={openHelp}
|
||||
className="flex items-center gap-3 cursor-pointer hover:opacity-80 transition-opacity"
|
||||
>
|
||||
<i className="diveicon di-question-circle text-red-500 text-2xl" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user