research-tracker / viewer /src /routes /SearchButtonComponent.svelte
dylanebert's picture
dylanebert HF staff
simple search name
f7592c1
raw
history blame contribute delete
493 Bytes
<script lang="ts">
import Row from "./Row";
export let row: Row;
export let col;
let key = col.key;
let clicked = false;
function onEditButtonClick(row: Row) {
const searchName = row.Name;
window.open("https://www.google.com/search?q=" + searchName, "_blank");
clicked = true;
}
</script>
<button class:clicked on:click={() => onEditButtonClick(row)}>{key}</button>
<style>
.clicked {
background-color: #ddd;
}
</style>