<script setup lang="ts">
import type { Component } from 'vue';
import classes from './ToolBar.module.css';

defineProps<{
  checked: boolean,
  icon: string | Component,
}>();

</script>
<template>
  <button type="button"
    :class="[classes.toolButton, classes.toolbarControl, classes.toolbarToggle, checked ? classes.toolbarToggleChecked : undefined]">
    <component :is="icon" />
  </button>
</template>
<style scoped></style>
