feat(segmentation): Enhance Segmentation with New AI and Once Click Tools (#4910)
This commit is contained in:
1 parent
908482d2e0
commit
c75a3f3af5
29 files changed
+846
-556
No files matched your search
@@ -2,12 +2,14 @@ import React from 'react';
|
||||
import RowInputRange from './RowInputRange';
|
||||
import RowSegmentedControl from './RowSegmentedControl';
|
||||
import RowDoubleRange from './RowDoubleRange';
|
||||
import { Button } from '../Button';
|
||||
|
||||
const SETTING_TYPES = {
|
||||
RANGE: 'range',
|
||||
RADIO: 'radio',
|
||||
CUSTOM: 'custom',
|
||||
DOUBLE_RANGE: 'double-range',
|
||||
BUTTON: 'button',
|
||||
};
|
||||
|
||||
function ToolSettings({ options }) {
|
||||
@@ -35,6 +37,8 @@ function ToolSettings({ options }) {
|
||||
return renderDoubleRangeSetting(option);
|
||||
case SETTING_TYPES.CUSTOM:
|
||||
return renderCustomSetting(option);
|
||||
case SETTING_TYPES.BUTTON:
|
||||
return renderButtonSetting(option);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -97,4 +101,16 @@ const renderCustomSetting = option => {
|
||||
);
|
||||
};
|
||||
|
||||
const renderButtonSetting = option => {
|
||||
return (
|
||||
<Button
|
||||
className="bg-primary"
|
||||
key={option.id}
|
||||
onClick={() => option.onChange()}
|
||||
>
|
||||
{option.name}
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
||||
export default ToolSettings;
|
||||
Reference in new issue
Block a user