mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
added margin prop to space component for setting margin top and button at the same time
This commit is contained in:
parent
f344e3803a
commit
0c5f3be504
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<component
|
||||
<component
|
||||
:is="tag"
|
||||
:style="styles"
|
||||
class="ds-space">
|
||||
@ -38,6 +38,13 @@ export default {
|
||||
type: [String, Object],
|
||||
default: 'large'
|
||||
},
|
||||
/**
|
||||
* The bottom and top margin of this space.
|
||||
*/
|
||||
margin: {
|
||||
type: [String, Object],
|
||||
default: null
|
||||
},
|
||||
/**
|
||||
* The html element name used for this space.
|
||||
*/
|
||||
@ -48,8 +55,11 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
styles() {
|
||||
const marginTop = this.mediaQuery(this.marginTop)
|
||||
const marginBottom = this.mediaQuery(this.marginBottom)
|
||||
const top = this.margin ? this.margin : this.marginTop
|
||||
const bottom = this.margin ? this.margin : this.marginBottom
|
||||
|
||||
const marginTop = this.mediaQuery(top)
|
||||
const marginBottom = this.mediaQuery(bottom)
|
||||
const marginTopStyle = this.parseMargin('Top')(marginTop)
|
||||
const marginBottomStyle = this.parseMargin('Bottom')(marginBottom)
|
||||
return {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user