File tree Expand file tree Collapse file tree
packages/ui/src/components/editor/panel/Presets Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7777 background-color : var (--vscode-tree-indentGuidesStroke );
7878 height : 100% ;
7979 width : 1px ;
80- margin-right : 11 px ;
80+ margin-right : 1 px ;
8181 margin-left : 4px ;
8282 }
8383
128128 flex : 1 ;
129129 }
130130}
131+
132+ .checkbox {
133+ appearance : none ;
134+ height : 15px ;
135+ width : 15px ;
136+ color : var (--vscode-checkbox-foreground );
137+ position : relative ;
138+ cursor : pointer ;
139+ flex-shrink : 0 ;
140+ margin : 0 ;
141+
142+ & :focus {
143+ outline : none ;
144+ }
145+
146+ & :disabled {
147+ opacity : var (--disabled-opacity );
148+ cursor : default ;
149+ }
150+
151+ & ::before {
152+ font-family : ' codicon' ;
153+ content : ' \eab2 ' ;
154+ font-size : 12px ;
155+ position : absolute ;
156+ top : 50% ;
157+ left : 50% ;
158+ transform : translate (-50% , -50% );
159+ opacity : var (--disabled-opacity );
160+ }
161+
162+ & :checked ::before {
163+ opacity : 1 ;
164+ }
165+ }
Original file line number Diff line number Diff line change 11import styles from './Presets.module.scss'
22import { IconButton } from '../IconButton/IconButton'
3- import { Checkbox } from '../../common/Checkbox'
43import cn from 'classnames'
54import { ReactSortable } from 'react-sortablejs'
65import { Icon } from '../../common/Icon'
@@ -449,12 +448,14 @@ export const Presets: React.FC<Presets.Props> = (props) => {
449448 ) }
450449 { preset . chatbot &&
451450 preset_indices_in_group . has ( preset . original_index ) && (
452- < Checkbox
451+ < input
452+ type = "checkbox"
453+ className = { styles . checkbox }
453454 checked = { ! ! preset . is_selected }
454- on_change = { ( ) =>
455+ onChange = { ( ) =>
455456 props . on_toggle_selected_preset ( preset . name ! )
456457 }
457- on_click = { ( e ) => e . stopPropagation ( ) }
458+ onClick = { ( e ) => e . stopPropagation ( ) }
458459 />
459460 ) }
460461 { preset . chatbot && (
You can’t perform that action at this time.
0 commit comments