

<template>
  <div class="greetings">
    222
     Count:{{  count}}
     <button @click="increment">Increment</button>
  </div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { useStore } from 'pinia'
defineProps({
  msg: {
    type: String,
    required: true
  }
})

export default defineComponent({
  setup(){
    const store = useStore();
    const count = store.count;
    const increment = () =>{
      store.count++;
    };
    return {
      count,
      increment
    }
  }
})

</script>
<style scoped>
h1 {
  font-weight: 500;
  font-size: 2.6rem;
  top: -10px;
}

h3 {
  font-size: 1.2rem;
}

.greetings h1,
.greetings h3 {
  text-align: center;
}

@media (min-width: 1024px) {
  .greetings h1,
  .greetings h3 {
    text-align: left;
  }
}
</style>
