/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// eslint-disable-next-line import/no-unassigned-import
import "toolkit-widgets/panel-list.js";
import { html, ifDefined } from "lit.all.mjs";
export default {
title: "UI Widgets/Panel Menu",
component: "panel-list",
parameters: {
status: "stable",
actions: {
handles: ["click"],
},
fluent: `
panel-list-item-one = Item One
panel-list-item-two = Item Two (accesskey w)
panel-list-item-three = Item Three
panel-list-checked = Checked
panel-list-badged = Badged, look at me
panel-list-passwords = Passwords
panel-list-settings = Settings
`,
},
};
const openMenu = e => {
e.target.getRootNode().querySelector("panel-list").toggle(e);
};
const Template = ({ isOpen, items, wideAnchor }) =>
html`
"
? html`
`
: html`