<template>
    <ul class="buttonMenu">
        <li>
            <a><slot name="title"></slot></a>
            <slot></slot>
        </li>
    </ul>
</template>

<script>
export default {
    name: 'ButtonMenu'
}
</script>

<style lang="scss">
ul.buttonMenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: transparent;
    display: inline-block;
    font-size: 15px;
    li {
        display: block;
        position: relative;
        background: #dae5fe;
        word-wrap: break-word;
        z-index: 10;
        cursor: default;
        ul {
            display: none;
        }
        a {
            display: block;
            text-decoration: none;
            color: #000;
            padding: 0px 15px;
            height: 40px;
        }
        &:hover {
            background: #b3cafc;
            > ul {
                display: block;
                position: absolute;
            }
            li {
                float: none;
            }
        }
    }
    > li {
        &:first-child {
            border-radius: 4px 0 0 4px;
        }
        &:last-child {
            border-radius: 0 4px 4px 0;
        }
        &:only-child {
            border-radius: 4px;
        }
    }
    ul {
        ul {
            left: 100%;
            top: 0;
        }
    }
    &:before {
        content: " ";
        display: table;
    }
    &:after {
        content: " ";
        display: table;
        clear: both;
    }
}
</style>
