Anvil/src/lib/components/atoms/DisplayName.svelte
André Jaenisch 4264975a16
fix: prevent XSS
I learned that I don't have to pass in the html thingy.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-02-21 18:13:27 +01:00

20 lines
473 B
Svelte

<script lang="ts">
import { _ } from 'svelte-i18n';
/**
* Under which name shall the person be known?
*/
export let displayName: string = '';
/**
* How to correctly address this person.
*/
export let pronoun: string = '';
</script>
<h1 class="h1 font-semibold text-4xl leading-tight">
<!-- FIXME: Include placeholder in i18n -->
<span class="sr-only">{$_('page.profile.heading')}</span>
{displayName}
</h1>
<p class="leading-normal my-1">({pronoun})</p>