/
dimamir
/
ory-kit
Обзор
Документация
Войти
/
dimamir
/
ory-kit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
development
authentication/src/lib/components/ory/internal/input/FlowInputButton.svelte
32 строки
813 B
Markus Thielker
ORY-49: add documentation to internal components
29 дек 2023, 02:51
29 дек 2023, 02:51
b5283bb
Код
Авторство
О чём код?
<script lang="ts"> import { fromNode, t } from "$lib/i18n"; import type { UiNode, UiNodeInputAttributes } from "@ory/client"; /** the node to render */ export let node: UiNode; const attributes = node.attributes as UiNodeInputAttributes; </script> <!-- @component # Do NOT use this internal component outside of the flow component tree! This component is used by the flow component to render a button. --> <button class="btn-primary" name={attributes.name} type="button" value={attributes.value} on:click={(e) => { if (attributes.onclick) { e.stopPropagation() e.preventDefault() const run = new Function(attributes.onclick); run(); } }} > {$t(fromNode(node), node.meta.label?.context)} </button>