mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-17 06:23:44 +08:00
fix: add fold-code button when code is expand
This commit is contained in:
@@ -196,11 +196,13 @@ function CustomCode(props: { children: any; className?: string }) {
|
||||
>
|
||||
{props.children}
|
||||
</code>
|
||||
{showToggle && collapsed && (
|
||||
{showToggle && (
|
||||
<div
|
||||
className={`show-hide-button ${collapsed ? "collapsed" : "expanded"}`}
|
||||
>
|
||||
<button onClick={toggleCollapsed}>{Locale.NewChat.More}</button>
|
||||
<button onClick={toggleCollapsed}>
|
||||
{collapsed ? Locale.NewChat.More : Locale.NewChat.Less}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user