Skip to content

Commit

Permalink
chore: add button type values (carbon-design-system#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-chase authored Feb 12, 2019
1 parent c187603 commit 3eb9591
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/components/cv-accordion/cv-accordion-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
:class="{ 'bx--accordion__item--active': dataOpen }"
>
<button
type="button"
class="bx--accordion__heading"
:aria-expanded="`${dataOpen}`"
:aria-controls="uid"
Expand All @@ -26,7 +27,9 @@
>
<path d="M0 10.6L4.7 6 0 1.4 1.4 0l6.1 6-6.1 6z"></path>
</svg>
<p class="bx--accordion__title"><slot name="title"></slot></p>
<p class="bx--accordion__title">
<slot name="title"></slot>
</p>
</button>
<div :id="uid" class="bx--accordion__content">
<slot name="content"></slot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
</cv-feedback-button>

<cv-button
type="button"
kind="ghost"
small
class="bx--snippet-btn--expand"
Expand Down
1 change: 1 addition & 0 deletions src/components/cv-code-snippet/_cv-feedback-button.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<button
type="button"
class="cv-feedback-button"
v-bind="$attrs"
data-copy-btn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<template>
<button
type="button"
class="cv-content-switcher-button"
:class="[
'bx--content-switcher-btn',
Expand Down
1 change: 1 addition & 0 deletions src/components/cv-data-table/_cv-data-table-heading.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<th :aria-sort="sortOrder">
<button
type="button"
v-if="sortable"
class="bx--table-sort-v2"
:class="{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
</div>
</div>
<button
type="button"
data-notification-btn
class="bx--inline-notification__close-button"
type="button"
@click="$emit('close')"
>
<svg
Expand Down
2 changes: 2 additions & 0 deletions src/components/cv-modal/cv-modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

<div class="bx--modal-footer" v-if="hasFooter">
<cv-button
type="button"
:kind="secondaryKind"
@click="onSecondaryClick"
v-if="this.$slots['secondary-button']"
Expand All @@ -56,6 +57,7 @@
<slot name="secondary-button">Secondary button</slot>
</cv-button>
<cv-button
type="button"
:kind="primaryKind"
@click="onPrimaryClick"
v-if="this.$slots['primary-button']"
Expand Down
1 change: 1 addition & 0 deletions src/components/cv-overflow-menu/cv-overflow-menu-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@keydown.esc.prevent="onEsc"
>
<button
type="button"
class="bx--overflow-menu-options__btn"
:data-floating-menu-primary-focus="primaryFocus"
:disabled="disabled"
Expand Down
7 changes: 5 additions & 2 deletions src/components/cv-pagination/cv-pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
v-for="(size, index) in pageSizes"
:key="index"
:value="`${size.value ? size.value : size}`"
>{{
size.label ? size.label : size.value ? size.value : size
}}</cv-select-option
>
{{ size.label ? size.label : size.value ? size.value : size }}
</cv-select-option>
</cv-select>

<span class="bx--pagination__text">
Expand All @@ -27,6 +28,7 @@
<span class="bx--pagination__text">{{ pageOfPages }}</span>

<button
type="button"
class="bx--pagination__button bx--pagination__button--backward"
data-page-backward
:aria-label="backwardText"
Expand Down Expand Up @@ -64,6 +66,7 @@
<span v-if="pages.length == 0">{{ pageValue }}</span>

<button
type="button"
class="bx--pagination__button bx--pagination__button--forward"
data-page-forward
:aria-label="forwardText"
Expand Down
2 changes: 2 additions & 0 deletions src/components/cv-search/_cv-search-inner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/>

<button
type="button"
v-if="isToolbarKind"
class="bx--toolbar-search__btn"
aria-label="Toolbar search"
Expand Down Expand Up @@ -49,6 +50,7 @@
</svg>

<button
type="button"
class="bx--search-close"
:class="{ 'bx--search-close--hidden': !clearVisible }"
title="Clear search input"
Expand Down
10 changes: 7 additions & 3 deletions src/components/cv-tile/_cv-tile-expandable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:class="[{ 'bx--tile--is-expanded': internalExpanded }]"
:style="styleObject"
>
<button class="bx--tile__chevron" @click="toggle">
<button type="button" class="bx--tile__chevron" @click="toggle">
<svg width="12" height="8" viewBox="0 0 12 8" fill-rule="evenodd">
<path d="M10.6 0L6 4.7 1.4 0 0 1.4l6 6.1 6-6.1z"></path>
</svg>
Expand All @@ -17,10 +17,14 @@
class="bx--tile-content__above-the-fold"
ref="aboveFold"
>
<slot> <!-- Above the fold content here --> </slot>
<slot>
<!-- Above the fold content here -->
</slot>
</span>
<span class="bx--tile-content__below-the-fold" ref="belowFold">
<slot name="below"> <!-- Rest of the content here --> </slot>
<slot name="below">
<!-- Rest of the content here -->
</slot>
</span>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<p class="bx--toast-notification__caption">{{ caption }}</p>
</div>
<button
type="button"
data-notification-btn
class="bx--toast-notification__close-button"
type="button"
@click="$emit('close')"
>
<svg
Expand Down

0 comments on commit 3eb9591

Please sign in to comment.