<script lang="ts">
  export let weight = 1;
  export let left = false;
  export let right = false;
</script>

<div class="hsplit-part" class:right class:left style="flex: {weight}"><slot></slot></div>

<style lang="sass">
  div.hsplit-part
    box-sizing: border-box
    padding: 0 0.5ch

    &.left
      padding-left: 0
    &.right
      padding-right: 0
</style>