Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(VBtn): add stacked and prepend/append icon props (#13643)
Co-authored-by: John Leider <john.j.leider@gmail.com>
- Loading branch information
1 parent
73f4cb5
commit f4ff228
Showing
7 changed files
with
70 additions
and
10 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,11 +1,14 @@ | ||
{ | ||
"props": { | ||
"appendIcon": "Adds an icon after the default slot content.", | ||
"block": "Expands the button to 100% of available space.", | ||
"color": "Applies specified color to the control - it can be the name of material color (for example `success` or `purple`) or css color (`#033` or `rgba(255, 0, 0, 0.5)`). You can find list of built in classes on the [colors page](/styles/colors#material-colors).", | ||
"disabled": "Removes the ability to click or target the component.", | ||
"flat": "Removes the button box shadow.", | ||
"icon": "Designates the button as icon. Button will become _round_ and applies the **text** prop.", | ||
"plain": "Removes the default background change applied when hovering over the button.", | ||
"prependIcon": "Adds an icon before the default slot content.", | ||
"stacked": "Displays the button as a flex-column.", | ||
"text": "Makes the background transparent. When using the **color** prop, the color will be applied to the button text instead of the background." | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,14 +1,18 @@ | ||
@mixin button-sizes { | ||
@function roundEven ($val) { | ||
@return 2 * round($val / 2) | ||
} | ||
|
||
@mixin button-sizes ($map: $button-sizes, $immediate: false) { | ||
@each $sizeName, $multiplier in $size-scales { | ||
$size: map-get($button-sizes, 'font-size') + (2 * $multiplier) / 16; | ||
$height: map-get($button-sizes, 'height') + (8 * $multiplier); | ||
$size: map-get($map, 'font-size') + (2 * $multiplier) / 16; | ||
$height: map-get($map, 'height') + (8 * $multiplier); | ||
|
||
.v-btn--size-#{$sizeName} { | ||
#{if($immediate, &, '')}.v-btn--size-#{$sizeName} { | ||
--v-btn-size: #{$size}; | ||
--v-btn-height: #{$height}; | ||
font-size: $size; | ||
min-width: round($height * $button-width-ratio); | ||
padding: 0 ($height / $button-padding-ratio); | ||
min-width: roundEven($height * map-get($map, 'width-ratio')); | ||
padding: 0 roundEven($height / map-get($map, 'padding-ratio')); | ||
} | ||
} | ||
} |
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