feat: Build the positions of the Switch handle #1739 (#2018)

### What problem does this PR solve?

feat: Build the positions of the Switch handle #1739

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-08-20 16:08:53 +08:00
committed by GitHub
parent 6f438e0a49
commit 02985fc905
5 changed files with 119 additions and 36 deletions

View File

@ -87,7 +87,19 @@ export const operatorIconMap = {
[Operator.Switch]: SwitchIcon,
};
export const operatorMap = {
export const operatorMap: Record<
Operator,
{
backgroundColor?: string;
color?: string;
width?: number;
height?: number;
fontSize?: number;
iconFontSize?: number;
iconWidth?: number;
moreIconColor?: number;
}
> = {
[Operator.Retrieval]: {
backgroundColor: '#cad6e0',
color: '#385974',
@ -388,7 +400,7 @@ export const initialExeSqlValues = {
top_n: 30,
};
export const initialSwitchValues = { conditions: [{}] };
export const initialSwitchValues = { conditions: [] };
export const CategorizeAnchorPointPositions = [
{ top: 1, right: 34 },