Skip to content

Commit 00c8a5c

Browse files
committed
見た目を修正
1 parent 3c70709 commit 00c8a5c

3 files changed

Lines changed: 202 additions & 156 deletions

File tree

app/(docs)/@docs/[lang]/[pageId]/pageContent.tsx

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ export function ChatListForSection(props: {
171171
sectionId: SectionId;
172172
chatHistories: ChatWithMessages[];
173173
fullWidth?: boolean;
174+
className?: string;
174175
}) {
175176
const { dynamicMdContent, sectionId, chatHistories } = props;
176177
const filteredChatHistories = chatHistories.filter(
@@ -195,8 +196,9 @@ export function ChatListForSection(props: {
195196
*/}
196197
<ul
197198
className={clsx(
199+
props.className,
198200
props.fullWidth
199-
? "block m-2"
201+
? ""
200202
: clsx(
201203
chatId === null
202204
? "hidden has-chat-1:block"
@@ -227,44 +229,42 @@ export function ChatListForSection(props: {
227229
))}
228230
</ul>
229231
{/*xl未満 or xl以上でチャットを表示している → 小さいボタンを表示*/}
230-
<details
231-
className={clsx(
232-
props.fullWidth
233-
? "hidden"
234-
: clsx(
235-
chatId === null
236-
? "block has-chat-1:hidden"
237-
: "block has-chat-2:hidden",
238-
"mt-2 ml-2"
239-
),
240-
"dropdown dropdown-end"
241-
)}
242-
>
243-
<summary className="btn btn-outline btn-secondary btn-sm">
244-
<ChatIcon />
245-
{filteredChatHistories.length}
246-
</summary>
247-
<ul
232+
{!props.fullWidth && (
233+
<details
248234
className={clsx(
249-
"menu menu-sm dropdown-content",
250-
"w-max max-w-[75vw]",
251-
"z-30",
252-
"rounded-lg shadow-sm bg-base-200/60 backdrop-blur-xs"
235+
chatId === null
236+
? "block has-chat-1:hidden"
237+
: "block has-chat-2:hidden",
238+
"mt-2 ml-2",
239+
"dropdown dropdown-end"
253240
)}
254241
>
255-
{filteredChatHistories.map(({ title, chatId }) => (
256-
<li key={chatId}>
257-
<Link
258-
className="text-wrap text-justify"
259-
href={`/chat/${chatId}`}
260-
scroll={false}
261-
>
262-
{title}
263-
</Link>
264-
</li>
265-
))}
266-
</ul>
267-
</details>
242+
<summary className="btn btn-outline btn-secondary btn-sm">
243+
<ChatIcon />
244+
{filteredChatHistories.length}
245+
</summary>
246+
<ul
247+
className={clsx(
248+
"menu menu-sm dropdown-content",
249+
"w-max max-w-[75vw]",
250+
"z-30",
251+
"rounded-lg shadow-sm bg-base-200/60 backdrop-blur-xs"
252+
)}
253+
>
254+
{filteredChatHistories.map(({ title, chatId }) => (
255+
<li key={chatId}>
256+
<Link
257+
className="text-wrap text-justify"
258+
href={`/chat/${chatId}`}
259+
scroll={false}
260+
>
261+
{title}
262+
</Link>
263+
</li>
264+
))}
265+
</ul>
266+
</details>
267+
)}
268268
</>
269269
);
270270
}

0 commit comments

Comments
 (0)