Skip to content

Instantly share code, notes, and snippets.

@Wolfr
Created November 21, 2019 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Wolfr/308e96477febe9c8a80f8de70e254521 to your computer and use it in GitHub Desktop.
Save Wolfr/308e96477febe9c8a80f8de70e254521 to your computer and use it in GitHub Desktop.
<script>
// Possible icon types
import IconDelete from './Icons/16/actions/delete.svg';
import IconQuestion from './Icons/16/actions/question.svg';
import IconAdd from './Icons/16/actions/add.svg';
import IconRemove from './Icons/16/actions/remove.svg';
import IconClose from './Icons/16/actions/close.svg';
export let icon;
</script>
{#if icon == 'delete'}
{@html IconDelete}
{/if}
{#if icon == 'question'}
{@html IconQuestion}
{/if}
{#if icon == 'add'}
{@html IconAdd}
{/if}
{#if icon == 'remove'}
{@html IconRemove}
{/if}
{#if icon == 'close'}
{@html IconClose}
{/if}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment