diff --git a/web-console/src/components/menu-checkbox/__snapshots__/menu-checkbox.spec.tsx.snap b/web-console/src/components/menu-checkbox/__snapshots__/menu-checkbox.spec.tsx.snap index 24b2770d3fe..96312ffad7e 100644 --- a/web-console/src/components/menu-checkbox/__snapshots__/menu-checkbox.spec.tsx.snap +++ b/web-console/src/components/menu-checkbox/__snapshots__/menu-checkbox.spec.tsx.snap @@ -1,18 +1,71 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`menu checkbox matches snapshot 1`] = ` +exports[`MenuCheckbox matches snapshot checked 1`] = ` +`; + +exports[`MenuCheckbox matches snapshot unchecked 1`] = ` +
  • + + + + + circle + + + + +
    + hello +
    +
  • `; diff --git a/web-console/src/components/menu-checkbox/menu-checkbox.scss b/web-console/src/components/menu-checkbox/menu-checkbox.scss deleted file mode 100644 index 8d4963a0cf3..00000000000 --- a/web-console/src/components/menu-checkbox/menu-checkbox.scss +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -.menu-checkbox { - height: 30px; - padding: 7px 4px; - - label { - margin: 0; - } -} diff --git a/web-console/src/components/menu-checkbox/menu-checkbox.spec.tsx b/web-console/src/components/menu-checkbox/menu-checkbox.spec.tsx index ef938a805e1..5e64abadf1e 100644 --- a/web-console/src/components/menu-checkbox/menu-checkbox.spec.tsx +++ b/web-console/src/components/menu-checkbox/menu-checkbox.spec.tsx @@ -21,9 +21,15 @@ import React from 'react'; import { MenuCheckbox } from './menu-checkbox'; -describe('menu checkbox', () => { - it('matches snapshot', () => { - const menuCheckbox = ; +describe('MenuCheckbox', () => { + it('matches snapshot checked', () => { + const menuCheckbox = {}} />; + const { container } = render(menuCheckbox); + expect(container.firstChild).toMatchSnapshot(); + }); + + it('matches snapshot unchecked', () => { + const menuCheckbox = {}} />; const { container } = render(menuCheckbox); expect(container.firstChild).toMatchSnapshot(); }); diff --git a/web-console/src/components/menu-checkbox/menu-checkbox.tsx b/web-console/src/components/menu-checkbox/menu-checkbox.tsx index e79db83c5e3..10cdad1dbc4 100644 --- a/web-console/src/components/menu-checkbox/menu-checkbox.tsx +++ b/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 ( -
  • - -
  • + ); } diff --git a/web-console/src/components/show-log/__snapshots__/show-log.spec.tsx.snap b/web-console/src/components/show-log/__snapshots__/show-log.spec.tsx.snap index 1dfe370bcc6..233b9e86635 100644 --- a/web-console/src/components/show-log/__snapshots__/show-log.spec.tsx.snap +++ b/web-console/src/components/show-log/__snapshots__/show-log.spec.tsx.snap @@ -8,7 +8,7 @@ exports[`show log describe show log 1`] = ` class="top-actions" >