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

Added Disabled Prop to Sidebar Item #4225

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

ahmadJT
Copy link
Contributor

@ahmadJT ahmadJT commented Apr 15, 2024

  • added disabled prop to side bar item

Description

  • Added a disabled prop to the sidebar item
  • Added disabled style when the item is disabled
  • Added demo example for disabled side bar item

Markup:

<template>
  <component
    ref="rootElement"
    class="va-sidebar__item va-sidebar-item"
    tabindex="0"
    :class="{
      'va-sidebar-item--active': $props.active,
      'va-sidebar-item--disabled': $props.disabled,
    }"
    :style="computedStyle"
    :is="tagComputed"
    v-bind="linkAttributesComputed"
    v-on="keyboardFocusListeners"
  >
    <slot />
  </component>
</template>

const props = defineProps({
 // removed to keep PR short
  disabled: { type: Boolean, default: false },
})

<style lang="scss">
@import "../variables";
@import "../../../styles/resources";

.va-sidebar-item {
// removed to keep PR short
  &--disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  @include keyboard-focus-outline("inherit", 2px, -2px);
}

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

Issue

closes #4151

@ahmadJT ahmadJT changed the title Bug/disabled sidebar item Added Disabled Prop to Sidebar Item Apr 15, 2024
@m0ksem m0ksem self-requested a review April 26, 2024 14:29
@m0ksem m0ksem merged commit 63c856d into epicmaxco:develop Apr 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VaSideBarItem doesn't have the disabled props
3 participants