diff --git a/README.md b/README.md index d6f9fe8..233d2cc 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,8 @@ const c = new CommandPal({ placeholder: "Custom placeholder text...", // Changes placeholder text of input debugOuput: false, // if true report debugging info to console hideButton: false, // if true, do not generate mobile button + headerText: null, // Text to display in the header of the palette. + // If null (default), do not add header. commands: [ // Commands go here ] diff --git a/src/App.svelte b/src/App.svelte index 3bd5aea..fb288d2 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -19,6 +19,7 @@ export let placeholderText: string; export let hideButton: boolean;; export let paletteId: string; + export let headerText: string; const optionsFuse = { isCaseSensitive: false, @@ -142,6 +143,15 @@ {/if} + +
+ {#if headerText !== null } + {headerText} + {/if} +