-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
109 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
<template> | ||
<base-button>Label</base-button> | ||
<button-base v-bind="$attrs" v-on="$listeners"> | ||
<slot name="default" /> | ||
</button-base> | ||
</template> | ||
|
||
<script> | ||
import BaseButton from '@foundation/core/Button'; | ||
import ButtonBase from './base'; | ||
export default { | ||
components: { | ||
BaseButton | ||
} | ||
ButtonBase | ||
}, | ||
inheritAttrs: false | ||
}; | ||
</script> | ||
|
||
|
||
<style lang="postcss" scoped> | ||
>>> .button { | ||
color: #333; | ||
background: #eee; | ||
border: solid #ccc 1px; | ||
color: white; | ||
background: #b00; | ||
border: solid #000 2px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<template> | ||
<base-button class="icon-button" v-bind="$attrs" v-on="$listeners"> | ||
<template #default> | ||
<slot name="icon" :iconName="iconName"> | ||
<base-icon class="icon" /> | ||
</slot> | ||
<slot name="default" :label="label"> | ||
<span class="label" v-html="label" /> | ||
</slot> | ||
</template> | ||
</base-button> | ||
</template> | ||
|
||
<script> | ||
import BaseButton from '../../index'; | ||
import BaseIcon from '../../../Icon'; | ||
export default { | ||
components: { | ||
BaseButton, | ||
BaseIcon | ||
}, | ||
props: { | ||
label: { | ||
type: String, | ||
default: 'Label' | ||
}, | ||
iconName: { | ||
type: String, | ||
default: 'iconName' | ||
} | ||
}, | ||
data () { | ||
return { | ||
}; | ||
}, | ||
methods: { | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="postcss" scoped> | ||
.icon-button { | ||
& .icon { | ||
width: 2em; | ||
} | ||
} | ||
</style> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<div> | ||
<fieldset> | ||
<legend>Button</legend> | ||
<form> | ||
<base-button /> | ||
</form> | ||
</fieldset> | ||
<fieldset> | ||
<legend>IconButton</legend> | ||
<form> | ||
<button-icon icon-name="icn" label="IconButton" /> | ||
</form> | ||
</fieldset> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import BaseButton from '@foundation/core/Button'; | ||
import ButtonIcon from '@foundation/core/Button/mutation/Icon'; | ||
export default { | ||
components: { | ||
BaseButton, | ||
ButtonIcon | ||
}, | ||
data () { | ||
return { | ||
iconButton: { | ||
iconName: 'check', | ||
label: 'IconButton' | ||
} | ||
}; | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters