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

Quickfix for action button and material design icon #1614

Merged
merged 2 commits into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"vue-eslint-parser": "^7.1.0",
"vue-jest": "^3.0.5",
"vue-loader": "^15.9.1",
"vue-material-design-icons": "^4.11.0",
"vue-styleguidist": "^4.33.9",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.42.1",
Expand Down
10 changes: 10 additions & 0 deletions src/assets/action.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@
background-repeat: no-repeat;
}

.material-design-icon {
width: $clickable-area;
height: $clickable-area;
opacity: $opacity_full;

.material-design-icon__svg {
vertical-align: middle;
}
}

// long text area
p {
width: 185px;
Expand Down
36 changes: 36 additions & 0 deletions src/components/ActionButton/ActionButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,42 @@ If you're using a long text you can specify a title
<ActionButton icon="icon-delete" title="Long button" @click="alert('Delete')">This button is associated with a very long text.\nAnd with new lines too.</ActionButton>
</Actions>
```

You can also use a custom icon, for example from the vue-material-design-icons library:

```vue
<template>
<Actions>
<ActionButton>
<HandLeft
slot="icon"
:size="16"
decorative
title="" />
Raise left hand
</ActionButton>
<ActionButton>
<HandRight
slot="icon"
:size="16"
decorative
title="" />
Raise right hand
</ActionButton>
</Actions>
</template>
<script>
import HandLeft from 'vue-material-design-icons/HandLeft'
import HandRight from 'vue-material-design-icons/HandRight'

export default {
components: {
HandLeft,
HandRight,
},
}
</script>
```
</docs>

<template>
Expand Down