<template>
	<div class="button" @click="emit('click')" :class="{ activeButton: isActive }">
		<slot name="default"></slot>
	</div>
</template>

<script setup>
const props = defineProps({
	isActive: {
		type: Boolean,
		default: false
	}
});
const emit = defineEmits(["click"]);
</script>

<style lang="scss" scoped>
.button {
	/* 复选标签 */
	height: 28px;
	/* 自动布局 */
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	border: 1px solid rgb(230, 231, 232);
	border-radius: 4px;
	background-color: rgb(255, 255, 255);
	color: rgb(59, 65, 75);
	font-size: 16px;
	font-weight: 400;
	cursor: pointer;
	padding-left: 8px;
	padding-right: 8px;
	flex-shrink: 0;
}
.activeButton {
	border: 1px solid rgb(10, 87, 166);
	background: rgb(246, 250, 255);
	color: rgb(10, 87, 166);
}
</style>
