Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Checkbox Button? #726

Open
major-mayer opened this issue Jan 8, 2024 · 4 comments
Open

Support for Checkbox Button? #726

major-mayer opened this issue Jan 8, 2024 · 4 comments
Labels
feature A new feature

Comments

@major-mayer
Copy link

Description

I'm coming from Buefy and am currently checking which of the components from Buefy are missing in Orgua.
Is it possible to add the "checkbox button" to Orgua as well: https://buefy.org/documentation/checkbox#checkbox-button
I did my research on the website but couldn't find an equivalent to this component.

Why Oruga need this feature

If I understand it correctly, Orgua is the spiritual successor of Buefy.
So to make the migration path easy, it would be nice if for all components from Buefy there is an equivalent in Orgua.

@mlmoravek
Copy link
Member

@jtommy could you check if this is just a styling topic or do we need to add some logic to it?

@mlmoravek mlmoravek added the feature A new feature label Jan 8, 2024
@myrsky-mapita
Copy link

The very similar radio button would also be very much appreciated 💕 https://buefy.org/documentation/radio#radio-button

@mlmoravek
Copy link
Member

@myrsky-mapita Maybe you can use the tab components with toggle type instead for now?

@dauriata
Copy link
Contributor

For information, I mimic buefy radio buttons with a rootClass="button" , checkedClass="is-primary" and this styling :

.b-radio.radio.button {
  input[type="radio"] {
    position: absolute;
    left: 0;
    opacity: 0;
    outline: none;
    z-index: -1;
  }
  .control-label {
    padding-left: 0px;
  }
}

Maybe worth adding to theme-bulma

This is the complete radioButton component I created for migration :

<template>
  <o-radio
    rootClass="button"
    checkedClass="is-primary"
    v-bind="attrs"
  >
    <template v-for="(_, slot) of $slots" v-slot:[slot]="scope">
      <slot :name="slot" v-bind="scope" />
    </template>
  </o-radio>
</template>

<script>
export default {
  setup(props,context) {
    const attrs=context.attrs
    return {attrs}
  }
};
</script>

<style lang="scss">
.b-radio.radio.button {
  input[type="radio"] {
    position: absolute;
    left: 0;
    opacity: 0;
    outline: none;
    z-index: -1;
  }
  .control-label {
    padding-left: 0px;
  }
}
</style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

No branches or pull requests

4 participants