(feat: search): close on click outside

This commit is contained in:
ManishMadan2882
2024-11-18 03:18:39 +05:30
parent cbf33e698b
commit 5ee0f15d94
4 changed files with 55 additions and 15 deletions

View File

@@ -78,14 +78,14 @@ const openContainer = keyframes`
height: 100px;
}
100% {
width: ${(props) => props.theme.dimensions.width} !important;
height: ${(props) => props.theme.dimensions.height} !important;
width: ${(props) => props.theme.dimensions.width};
height: ${(props) => props.theme.dimensions.height};
border-radius: 12px;
}`
const closeContainer = keyframes`
0% {
width: ${(props) => props.theme.dimensions.width} !important;
height: ${(props) => props.theme.dimensions.height} !important;
width: ${(props) => props.theme.dimensions.width};
height: ${(props) => props.theme.dimensions.height};
border-radius: 12px;
}
100% {
@@ -671,6 +671,7 @@ export const WidgetCore = ({
const handleImageError = (event: React.SyntheticEvent<HTMLImageElement, Event>) => {
event.currentTarget.src = "https://d3dg1063dc54p9.cloudfront.net/cute-docsgpt.png";
};
const dimensions =
typeof size === 'object' && 'custom' in size
? sizesConfig.getCustom(size.custom)