mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 21:56:00 +00:00
18 lines
416 B
Svelte
18 lines
416 B
Svelte
<script lang="ts">
|
|
import FontIcon from '../icons/FontIcon.svelte';
|
|
|
|
export let constraintType;
|
|
export let constraintName;
|
|
|
|
function getConstraintIcon(type) {
|
|
if (type == 'primaryKey') return 'img primary-key';
|
|
if (type == 'foreignKey') return 'img foreign-key';
|
|
return null;
|
|
}
|
|
</script>
|
|
|
|
<span class="nowrap">
|
|
<FontIcon icon={getConstraintIcon(constraintType)} />
|
|
{constraintName}
|
|
</span>
|