<template>
  <div
    class="menuItem"
    :class="{
      menuActive: active,
    }"
  >
    <div class="icon">
      <slot name="icon"></slot>
    </div>
    <div class="menuName">{{ name }}</div>
  </div>
</template>
<script lang="ts" setup>
const props = defineProps<{
  name: string;
  active: boolean;
}>();
</script>
<style lang="scss" scoped>
$notSelectColor: #959595;
$selectColor: #353535;

.menuItem {
  cursor: pointer;
  display: flex;
  align-items: center;
  color: $notSelectColor;
  width: 184px;
  height: 40px;
  .icon {
    margin-left: 27px;
    margin-right: 17px;
  }
  .menuName {
    font-size: 14px;
    font-family: PingFangSC-Semibold, PingFang SC;
    font-weight: 600;
    line-height: 20px;
  }
}
.menuActive {
  color: $selectColor;
  background: #e5e5e5;
  border-radius: var(--border-radius);
}
</style>
