mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
add buttons to custom model menu items
This commit is contained in:
parent
6d757ff91f
commit
191118b90b
4 changed files with 41 additions and 8 deletions
|
|
@ -2,11 +2,14 @@ import React from 'react';
|
|||
import RenameIcon from '../svg/RenameIcon';
|
||||
import CheckMark from '../svg/CheckMark';
|
||||
|
||||
export default function RenameButton({ renaming, renameHandler, onRename }) {
|
||||
export default function RenameButton({ renaming, renameHandler, onRename, twcss }) {
|
||||
const handler = renaming ? onRename : renameHandler;
|
||||
|
||||
const classProp = { className: "p-1 hover:text-white" };
|
||||
if (twcss) {
|
||||
classProp.className = twcss;
|
||||
}
|
||||
return (
|
||||
<button className="p-1 hover:text-white" onClick={handler}>
|
||||
<button {...classProp} onClick={handler}>
|
||||
{renaming ? <CheckMark /> : <RenameIcon />}
|
||||
</button>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue