<script setup>
const props = defineProps({
  width: {
    type: String,
    default: "calc(100vw - 20px)",
  },
  rounded: {
    type: Number,
    default: 10,
  },
  onClick: {
    type: Function,
    default: () => {},
  },
});
</script>

<template>
  <view
    class="container"
    :style="{ width: width, borderRadius: rounded + 'px' }"
    @click="onClick"
  >
    <slot />
  </view>
</template>

<style scoped>
.container {
  margin: 0 auto;
  height: 40px;
  line-height: 40px;
  font-weight: bold;
  background-color: #fed847;
  font-size: 15px;
  text-align: center;
}
</style>
