mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 14:46:01 +00:00
table structure tab
This commit is contained in:
17
packages/web/src/elements/ConstraintLabel.svelte
Normal file
17
packages/web/src/elements/ConstraintLabel.svelte
Normal file
@@ -0,0 +1,17 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user