ccaominh commented on a change in pull request #10454:
URL: https://github.com/apache/druid/pull/10454#discussion_r497694299
##########
File path: web-console/src/components/menu-checkbox/menu-checkbox.tsx
##########
@@ -16,15 +16,26 @@
* limitations under the License.
*/
-import { Checkbox, ICheckboxProps } from '@blueprintjs/core';
+import { MenuItem } from '@blueprintjs/core';
+import { IconNames } from '@blueprintjs/icons';
import React from 'react';
-import './menu-checkbox.scss';
+export interface MenuCheckboxProps {
+ text: string;
+ checked: boolean;
+ onChange: () => void;
+}
+
+export function MenuCheckbox(props: MenuCheckboxProps) {
+ const { text, checked, onChange } = props;
-export function MenuCheckbox(props: ICheckboxProps) {
return (
- <li className="menu-checkbox">
- <Checkbox {...props} />
- </li>
+ <MenuItem
+ className="menu-checkbox"
+ icon={checked ? IconNames.TICK : IconNames.BLANK}
Review comment:
If none of the menu items are checked, there's no visual clue that the
menu item has a checkbox since it's blank. Maybe something like the `TICK
CIRCLE` / `CIRCLE` icons could be used instead? Or, if this was changed to use
the `Switch` component (like the other changes you made in the PR), would it
have similar styling issues?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]