sync-engines-list.stories.mjs (1424B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 import { html } from "chrome://global/content/vendor/lit.all.mjs"; 6 import "chrome://browser/content/preferences/widgets/sync-engines-list.mjs"; 7 import "chrome://browser/content/preferences/widgets/placeholder-message.mjs"; 8 9 export default { 10 title: "Domain-specific UI Widgets/Settings/Sync Engines List", 11 component: "sync-engines-list", 12 parameters: { 13 status: "in-development", 14 }, 15 argTypes: { 16 engines: { 17 control: "check", 18 options: [ 19 "bookmarks", 20 "history", 21 "tabs", 22 "passwords", 23 "settings", 24 "addresses", 25 "payments", 26 "addons", 27 ], 28 }, 29 }, 30 }; 31 32 window.MozXULElement.insertFTLIfNeeded("browser/preferences/preferences.ftl"); 33 34 const Template = ({ engines = [] }) => html` 35 <div style="max-width: 520px"> 36 <sync-engines-list .engines=${engines}></sync-engines-list> 37 </div> 38 `; 39 40 export const Default = Template.bind({}); 41 Default.args = { 42 // Note: "addons" icon currently doesn’t render in Storybook. 43 engines: [ 44 "bookmarks", 45 "history", 46 "tabs", 47 "passwords", 48 "settings", 49 "addresses", 50 "payments", 51 ], 52 }; 53 54 export const EmptyState = Template.bind({}); 55 EmptyState.args = { 56 engines: [], 57 };