({ name, field, onclickFun = () => {} })
| 106 | } |
| 107 | |
| 108 | function checkBoxItem({ name, field, onclickFun = () => {} }) { |
| 109 | const [value, setValue] = useState(CONFIG[field]); |
| 110 | return React.createElement( |
| 111 | "div", |
| 112 | { className: "popup-row" }, |
| 113 | React.createElement("label", { className: "col description" }, name), |
| 114 | React.createElement( |
| 115 | "div", |
| 116 | { className: "col action" }, |
| 117 | React.createElement( |
| 118 | "button", |
| 119 | { |
| 120 | className: `checkbox${value ? "" : " disabled"}`, |
| 121 | onClick: () => { |
| 122 | CONFIG[field] = !value; |
| 123 | setValue(!value); |
| 124 | saveConfig(); |
| 125 | onclickFun(); |
| 126 | }, |
| 127 | }, |
| 128 | React.createElement(DisplayIcon, { |
| 129 | icon: Spicetify.SVGIcons.check, |
| 130 | size: 16, |
| 131 | }) |
| 132 | ) |
| 133 | ) |
| 134 | ); |
| 135 | } |
| 136 | |
| 137 | function dropDownItem({ name, field, options, onclickFun = () => {} }) { |
| 138 | const [value, setValue] = useState(CONFIG[field]); |
nothing calls this directly
no test coverage detected