(fix:ui) mninor adjustments

This commit is contained in:
ManishMadan2882
2025-03-07 17:20:14 +05:30
parent 773147701d
commit b3f6a3aae6
4 changed files with 23 additions and 20 deletions

View File

@@ -11,6 +11,7 @@ function Dropdown({
rounded = 'xl',
border = 'border-2',
borderColor = 'silver',
darkBorderColor = 'dim-gray',
showEdit,
onEdit,
showDelete,
@@ -38,6 +39,7 @@ function Dropdown({
rounded?: 'xl' | '3xl';
border?: 'border' | 'border-2';
borderColor?: string;
darkBorderColor?: string;
showEdit?: boolean;
onEdit?: (value: { name: string; id: string; type: string }) => void;
showDelete?: boolean;
@@ -77,7 +79,7 @@ function Dropdown({
>
<button
onClick={() => setIsOpen(!isOpen)}
className={`flex w-full cursor-pointer items-center justify-between ${border} border-${borderColor} bg-white px-5 py-3 dark:border-${borderColor}/40 dark:bg-transparent ${
className={`flex w-full cursor-pointer items-center justify-between ${border} border-${borderColor} bg-white px-5 py-3 dark:border-${darkBorderColor} dark:bg-transparent ${
isOpen ? `${borderTopRadius}` : `${borderRadius}`
}`}
>
@@ -114,7 +116,7 @@ function Dropdown({
</button>
{isOpen && (
<div
className={`absolute left-0 right-0 z-20 -mt-1 max-h-40 overflow-y-auto rounded-b-xl ${border} border-${borderColor} bg-white shadow-lg dark:border-${borderColor}/40 dark:bg-dark-charcoal`}
className={`absolute left-0 right-0 z-20 -mt-1 max-h-40 overflow-y-auto rounded-b-xl ${border} border-${borderColor} bg-white shadow-lg dark:border-${darkBorderColor} dark:bg-dark-charcoal`}
>
{options.map((option: any, index) => (
<div

View File

@@ -143,9 +143,9 @@ const ConversationBubble = forwardRef<
onChange={(e) => {
setEditInputBox(e.target.value);
}}
onKeyDown={(e) => {
if(e.key === 'Enter' && !e.shiftKey){
e.preventDefault();
onKeyDown={(e) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
handleEditClick();
}
}}

View File

@@ -240,16 +240,6 @@ export default function Documents({
iconHeight: 18,
variant: 'primary',
},
{
icon: Trash,
label: t('convTile.delete'),
onClick: () => {
handleDeleteConfirmation(index, document);
},
iconWidth: 18,
iconHeight: 18,
variant: 'danger',
},
];
if (document.syncFrequency) {
@@ -269,6 +259,17 @@ export default function Documents({
});
}
actions.push({
icon: Trash,
label: t('convTile.delete'),
onClick: () => {
handleDeleteConfirmation(index, document);
},
iconWidth: 18,
iconHeight: 18,
variant: 'danger',
});
return actions;
};
useEffect(() => {
@@ -310,7 +311,7 @@ export default function Documents({
/>
</div>
<button
className="rounded-full w-full sm:w-40 bg-purple-30 px-4 py-3 text-white hover:bg-[#6F3FD1]"
className="rounded-full w-[108px] h-[32px] text-sm bg-purple-30 text-white hover:bg-[#6F3FD1] flex items-center justify-center"
title={t('settings.documents.addNew')}
onClick={() => {
setIsOnboarding(false);

View File

@@ -99,9 +99,9 @@ function Upload({
)
}
borderVariant="thin"
label={field.label}
required={isRequired}
colorVariant="silver"
labelBgClassName="bg-white dark:bg-charleston-green-2"
/>
);
case 'number':
@@ -121,9 +121,9 @@ function Upload({
)
}
borderVariant="thin"
label={field.label}
required={isRequired}
colorVariant="silver"
labelBgClassName="bg-white dark:bg-charleston-green-2"
/>
);
case 'enum':
@@ -609,7 +609,7 @@ function Upload({
onChange={(e) => setDocName(e.target.value)}
borderVariant="thin"
placeholder={t('modals.uploadDoc.name')}
label={t('modals.uploadDoc.name')}
labelBgClassName="bg-white dark:bg-charleston-green-2"
required={true}
/>
<div className="my-2" {...getRootProps()}>
@@ -668,8 +668,8 @@ function Upload({
onChange={(e) => setRemoteName(e.target.value)}
borderVariant="thin"
placeholder="Name"
label="Name"
required={true}
labelBgClassName="bg-white dark:bg-charleston-green-2"
/>
{renderFormFields()}
{IngestorFormSchemas[ingestor.type].some(