fix ui add border around search plus animation (#2005)
* fix ui add border around search plus animation * code style
This commit is contained in:
parent
f2e9876802
commit
3d30010a4e
1 changed files with 21 additions and 5 deletions
|
|
@ -17,11 +17,10 @@ import {
|
|||
edit,
|
||||
fetchFilterSearch,
|
||||
} from 'Duck/search';
|
||||
import { Icon, Input, Toggler as Switch } from 'UI';
|
||||
import { Icon, Input } from 'UI';
|
||||
|
||||
import FilterModal from 'Shared/Filters/FilterModal';
|
||||
|
||||
import { SwitchToggle } from '../../ui/Toggler/Toggler';
|
||||
import OutsideClickDetectingDiv from '../OutsideClickDetectingDiv';
|
||||
|
||||
const ASSIST_ROUTE = assistRoute();
|
||||
|
|
@ -187,7 +186,10 @@ function AiSessionSearchField(props: Props) {
|
|||
};
|
||||
return (
|
||||
<div className={'bg-white rounded-lg'}>
|
||||
<div style={gradientBoxUnfocused}>
|
||||
<div
|
||||
className={aiFiltersStore.isLoading ? 'animate-bg-spin' : ''}
|
||||
style={tab === 'ask' ? gradientBox : gradientBoxUnfocused}
|
||||
>
|
||||
<div ref={askAiRef} className={'px-2'}>
|
||||
<AskAiSwitchToggle
|
||||
enabled={tab === 'ask'}
|
||||
|
|
@ -307,10 +309,24 @@ export const AskAiSwitchToggle = ({
|
|||
);
|
||||
};
|
||||
|
||||
const gradientBox = {
|
||||
border: 'double 1.5px transparent',
|
||||
borderRadius: '6px',
|
||||
background:
|
||||
'linear-gradient(#ffffff, #ffffff), linear-gradient(-45deg, #394eff, #3eaaaf, #3ccf65)',
|
||||
backgroundOrigin: 'border-box',
|
||||
backgroundSize: '200% 200%',
|
||||
backgroundClip: 'content-box, border-box',
|
||||
display: 'flex',
|
||||
gap: '0.25rem',
|
||||
alignItems: 'center',
|
||||
width: '100%',
|
||||
};
|
||||
|
||||
const gradientBoxUnfocused = {
|
||||
borderRadius: '6px',
|
||||
border: 'double 1px transparent',
|
||||
background: 'white',
|
||||
border: 'solid 1.5px #BFBFBF',
|
||||
background: '#fffff',
|
||||
display: 'flex',
|
||||
gap: '0.25rem',
|
||||
alignItems: 'center',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue