mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-04-06 01:25:31 +00:00
added full-width option to button
This commit is contained in:
parent
4c5d923284
commit
f344e3803a
@ -9,20 +9,21 @@
|
|||||||
danger && `ds-button-danger`,
|
danger && `ds-button-danger`,
|
||||||
ghost && `ds-button-ghost`,
|
ghost && `ds-button-ghost`,
|
||||||
iconOnly && `ds-button-icon-only`,
|
iconOnly && `ds-button-icon-only`,
|
||||||
hover && `ds-button-hover`
|
hover && `ds-button-hover`,
|
||||||
|
fullWidth && `ds-button-full-width`
|
||||||
]"
|
]"
|
||||||
v-bind="bindings"
|
v-bind="bindings"
|
||||||
:is="linkTag">
|
:is="linkTag">
|
||||||
<ds-icon
|
<ds-icon
|
||||||
v-if="icon"
|
v-if="icon"
|
||||||
:name="icon"/>
|
:name="icon"/>
|
||||||
<span
|
<span
|
||||||
class="ds-button-text"
|
class="ds-button-text"
|
||||||
v-if="$slots.default">
|
v-if="$slots.default">
|
||||||
<slot />
|
<slot />
|
||||||
</span>
|
</span>
|
||||||
<ds-icon
|
<ds-icon
|
||||||
v-if="iconRight"
|
v-if="iconRight"
|
||||||
:name="iconRight"/>
|
:name="iconRight"/>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
@ -122,6 +123,13 @@ export default {
|
|||||||
iconRight: {
|
iconRight: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Should the button spread to the full with of the parent?
|
||||||
|
*/
|
||||||
|
fullWidth: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
@ -32,6 +32,12 @@ Use different sizes to create hierarchy.
|
|||||||
<ds-button size="large">Large</ds-button>
|
<ds-button size="large">Large</ds-button>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Button full width
|
||||||
|
|
||||||
|
```
|
||||||
|
<ds-button full-width>Full Width</ds-button>
|
||||||
|
```
|
||||||
|
|
||||||
## Button states
|
## Button states
|
||||||
|
|
||||||
A button can take different states.
|
A button can take different states.
|
||||||
@ -60,4 +66,4 @@ Provide a path to the button. You can pass a url string or a Vue router path obj
|
|||||||
```
|
```
|
||||||
<ds-button path="/navigation">Click me</ds-button>
|
<ds-button path="/navigation">Click me</ds-button>
|
||||||
<ds-button :path="{ name: 'Navigation' }">Click me</ds-button>
|
<ds-button :path="{ name: 'Navigation' }">Click me</ds-button>
|
||||||
```
|
```
|
||||||
|
|||||||
@ -202,3 +202,7 @@
|
|||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ds-button-full-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user