Skip to content

Commit

Permalink
fix(card): action button should render a <button> tag
Browse files Browse the repository at this point in the history
  • Loading branch information
stasson committed Sep 30, 2017
1 parent d975a18 commit 30e7f25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
11 changes: 0 additions & 11 deletions components/card/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ container:

| props | Type | Default | Description |
|-------|------|---------|-------------|
|`href`| String |optional| sets button's link |
|`disabled`| boolean |false| wether the button is disabled |

```html
Expand All @@ -110,16 +109,6 @@ container:
</mdc-card>
```

Actions Buttons can also be links specifying the href property

```html
<mdc-card>
<mdc-card-actions>
<mdc-card-action-button href="#">Link</mdc-card-action-button>
</mdc-card-actions>
</mdc-card>
```

### Horizontal block

You can stack multiple card blocks horizontally instead of vertically, by
Expand Down
13 changes: 5 additions & 8 deletions components/card/mdc-card-action-button.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<template>
<a :href="disabled?undefined:href" >
<button ref="root" class="mdc-card-action-button"
:class="classes" :style="styles" :disabled="disabled"
@click="$emit('click')">
<slot />
</button>
</a>
<button ref="root" class="mdc-card-action-button"
:class="classes" :style="styles" :disabled="disabled"
@click="$emit('click')">
<slot />
</button>
</template>

<script lang="babel">
Expand All @@ -14,7 +12,6 @@ import {RippleBase} from '../util'
export default {
name: 'mdc-card-action-button',
props: {
href: String,
disabled: Boolean
},
data () {
Expand Down

0 comments on commit 30e7f25

Please sign in to comment.