Files
hoppscotch/components/graphql/typelink.vue
2020-02-24 21:06:23 -05:00

35 lines
559 B
Vue

<template>
<span class="typelink" @click="jumpToType">{{ typeString }}</span>
</template>
<style scoped lang="scss">
.typelink {
color: var(--ac-color);
font-family: "Roboto Mono", monospace;
font-weight: 400;
cursor: pointer;
}
</style>
<script>
export default {
props: {
gqlType: null,
// (typeName: string) => void
jumpTypeCallback: Function,
},
computed: {
typeString() {
return this.gqlType.toString()
},
},
methods: {
jumpToType() {
this.jumpTypeCallback(this.gqlType)
},
},
}
</script>