diff --git a/README.md b/README.md index bb657d3..aad6cc8 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,13 @@ yarn add svelte-barcode --save ❌ Overide the text that is diplayed + + altText + string? + value prop + ❌ + Overide the alt text for an img barcode. + fontOptions string? diff --git a/src/Barcode.svelte b/src/Barcode.svelte index ca35302..179b27e 100644 --- a/src/Barcode.svelte +++ b/src/Barcode.svelte @@ -40,7 +40,7 @@ {#if elementTag === 'img'} - + {options.altText || value} {:else if elementTag === 'canvas'} {:else}