Commit 230a38f4 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Remove references to deprecated and unused `SvgIcon`

parent 988e9041
......@@ -5,6 +5,10 @@ import { useEffect, useRef } from 'preact/hooks';
import MenuKeyboardNavigation from './MenuKeyboardNavigation';
import Slider from './Slider';
/**
* @typedef {import('../icons').sidebarIcons} SidebarIcons
*/
/**
* Render a clickable div that will toggle the expanded state of the
* associated submenu via `onToggleSubmenu`.
......@@ -61,11 +65,10 @@ function SubmenuToggle({ title, isExpanded, onToggleSubmenu }) {
* `onClick` callback should be supplied.
* @prop {string} [iconAlt] - Alt text for icon.
* @prop {string} [icon] -
* Name or URL of icon to display. If the value is a URL it is displayed using an `<img>`,
* if it is a name it is displayed using `SvgIcon`. If the property is `"blank"` a blank
* placeholder is displayed in place of an icon. If the property is falsey, no placeholder
* is displayed. The placeholder is useful to keep menu item labels aligned in a list if
* some items have icons and others do not.
* Name or URL of icon to display. If the value is a URL it is displayed using an `<img>`;
* if it is a non-URL string it is assumed to be the `name` of a registered icon.
* If the property is `"blank"` a blank placeholder is displayed in place of an icon.
* The placeholder is useful to keep menu item labels aligned.
* @prop {boolean} [isDisabled] -
* Dim the label to indicate that this item is not currently available. The `onClick`
* callback will still be invoked when this item is clicked and the submenu, if any,
......@@ -101,8 +104,8 @@ function SubmenuToggle({ title, isExpanded, onToggleSubmenu }) {
* When clicked, menu items either open an external link, if the `href` prop
* is provided, or perform a custom action via the `onClick` callback.
*
* The icon can either be an external SVG image, referenced by URL, or a named
* icon rendered by an `SvgIcon`.
* The icon can either be an external SVG image, referenced by URL, or the
* name of an icon registered in the application. @see {SidebarIcons}
*
* For items that have submenus, the `MenuItem` will call the `renderSubmenu`
* prop to render the content of the submenu, when the submenu is visible.
......
......@@ -56,8 +56,7 @@ import expandMenuIcon from '../images/icons/expand-menu.svg';
import pointerIcon from '../images/icons/pointer.svg';
/**
* Set of icons used by the sidebar application via the `SvgIcon`
* component.
* Set of icons used by the sidebar application
*/
export const sidebarIcons = {
add: plus,
......
......@@ -13,9 +13,7 @@ import { Adapter } from 'enzyme-adapter-preact-pure';
configure({ adapter: new Adapter() });
// Make all the icons that are available for use with `SvgIcon` in the actual
// app available in the tests. This enables validation of icon names passed to
// `SvgIcon`.
// Make all the icons that are registered by the application available in tests.
import { sidebarIcons } from '../icons';
import { annotatorIcons } from '../../annotator/icons';
import { registerIcons } from '@hypothesis/frontend-shared';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment