<template>
    <div class="el-radio" :class="{ checked: value === label }">
        <i class="icon"></i><slot></slot>
    </div>
</template>

<script>
export default {
    props: {
        label: [String, Number],
        value: [String, Number]
    }
}
</script>

<style lang="less" scoped>
.el-radio {
    font-size: 14px;
    padding: 3px 0;
    &.checked {
        color: #409EFF;
        .icon {
            border-color: #409EFF;
            background-color: #409EFF;
        }
    }
    .icon {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        margin-right: 10px;
        background-color: #FFF;
        border: 1px solid #DCDFE6;
        line-height: 1;
        vertical-align: top;
        position: relative;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        &::after {
            content: "";
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background-color: #fff;
        }
    }
}
</style>
