<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>
