mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 03:16:01 +00:00
22 lines
525 B
Svelte
22 lines
525 B
Svelte
<script lang="ts">
|
|
import FormStyledButton from '../buttons/FormStyledButton.svelte';
|
|
import { openWebLink } from '../utility/simpleTools';
|
|
|
|
export let text: string;
|
|
export let link: string;
|
|
export let colorClass: string = '';
|
|
|
|
// very light url guard
|
|
const safe = /^(https?:)?\/\//i.test(link) || link.startsWith('/');
|
|
</script>
|
|
|
|
<div class="center">
|
|
<FormStyledButton on:click={() => openWebLink(link)} value={text} skipWidth {colorClass} />
|
|
</div>
|
|
|
|
<style>
|
|
.center {
|
|
text-align: center;
|
|
}
|
|
</style>
|