feat: update loading indicator position in Selectable component

This commit is contained in:
Aditya 2025-02-01 10:44:08 +05:30
parent 7b858588f0
commit 7216102d33

View File

@ -1,11 +1,11 @@
/*
* Copyright © 2025 Hexastack. All rights reserved.
*
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
*/
/*
* Copyright © 2025 Hexastack. All rights reserved.
*
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
*/
import { Box, CircularProgress, Input, styled } from "@mui/material";
@ -208,23 +208,20 @@ const Selectable: FC<SelectableProps> = ({
value={text}
onChange={(e) => handleTextChange(e.target.value)}
placeholder={placeholder}
endAdornment={
true ? (
<CircularProgress
size={20}
style={{
position: "absolute",
right: 0,
top: "20%",
transform: "translateY(-20%)",
}}
/>
) : null
}
/>
{
loading && (
<CircularProgress
size={20}
thickness={5}
style={
{
position: "absolute",
top: "30%",
right: "5px",
transform: "translateY(-30%)"
}
}
/>
)
}
</SelectableBox>
);
};