mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
imporved heading component
This commit is contained in:
parent
6b24804eb0
commit
7cc53d7426
@ -4,8 +4,10 @@
|
|||||||
class="ds-heading"
|
class="ds-heading"
|
||||||
:class="[
|
:class="[
|
||||||
`ds-heading-${size || tag}`,
|
`ds-heading-${size || tag}`,
|
||||||
|
align && `ds-heading-align-${align}`,
|
||||||
primary && `ds-heading-primary`,
|
primary && `ds-heading-primary`,
|
||||||
soft && `ds-heading-soft`
|
soft && `ds-heading-soft`,
|
||||||
|
noMargin && `ds-heading-no-margin`
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
@ -59,6 +61,25 @@ export default {
|
|||||||
soft: {
|
soft: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Remove Margin
|
||||||
|
* `true, false`
|
||||||
|
*/
|
||||||
|
noMargin: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Text Align
|
||||||
|
* `left, center, right`
|
||||||
|
*/
|
||||||
|
align: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
validator: value => {
|
||||||
|
return value.match(/(left|center|right)/)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,3 +32,22 @@ Use primary headings for important headlines, like a page title. Use soft headin
|
|||||||
<ds-heading primary>The quick brown fox</ds-heading>
|
<ds-heading primary>The quick brown fox</ds-heading>
|
||||||
<ds-heading soft>The quick brown fox</ds-heading>
|
<ds-heading soft>The quick brown fox</ds-heading>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## No Margin
|
||||||
|
|
||||||
|
You can remove the margin easily
|
||||||
|
|
||||||
|
```
|
||||||
|
<ds-heading no-margin>The quick brown fox</ds-heading>
|
||||||
|
<ds-heading no-margin>The quick brown fox</ds-heading>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Text Align
|
||||||
|
|
||||||
|
Align text
|
||||||
|
|
||||||
|
```
|
||||||
|
<ds-heading align="left">The quick brown fox</ds-heading>
|
||||||
|
<ds-heading align="center">The quick brown fox</ds-heading>
|
||||||
|
<ds-heading align="right">The quick brown fox</ds-heading>
|
||||||
|
```
|
||||||
|
|||||||
@ -41,3 +41,17 @@
|
|||||||
.ds-heading-h6 {
|
.ds-heading-h6 {
|
||||||
font-size: $font-size-small;
|
font-size: $font-size-small;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ds-heading-no-margin {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ds-heading-align-left {
|
||||||
|
text-align: left
|
||||||
|
}
|
||||||
|
.ds-heading-align-center {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
.ds-heading-align-right {
|
||||||
|
text-align: right
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user