|
2 | 2 | /// @group button |
3 | 3 | //// |
4 | 4 |
|
| 5 | +@import '~@react-md/icon/dist/functions'; |
5 | 6 | @import '~@react-md/theme/dist/helpers'; |
6 | 7 | @import '~@react-md/theme/dist/mixins'; |
7 | 8 | @import '~@react-md/theme/dist/variables'; |
@@ -103,6 +104,46 @@ $rmd-button-floating-z-index: $rmd-utils-temporary-element-z-index !default; |
103 | 104 | /// @type Number |
104 | 105 | $rmd-button-floating-margin: 1.5rem !default; |
105 | 106 |
|
| 107 | +/// The size to use for a `CircularProgress` that exists as a child of the |
| 108 | +/// `Button`. The styles will only be created if this value is not `null`, the |
| 109 | +/// `@react-md/progress` package has been installed, and the |
| 110 | +/// `@react-md/progress`'s `mixin`s have been imported in the same file as the |
| 111 | +/// `@react-md/button`'s `mixin`s. |
| 112 | +/// |
| 113 | +/// @example scss - Includes `CircularProgress` size<!-- no-compile --> |
| 114 | +/// @import '~@react-md/button/dist/mixins'; |
| 115 | +/// @import '~@react-md/progress/dist/mixins'; |
| 116 | +/// @import '~@react-md/utils/dist/mixins'; |
| 117 | +/// |
| 118 | +/// // can also manually set it to a different value if desired: |
| 119 | +/// // $rmd-button-circular-progress-size: 1.5rem; |
| 120 | +/// |
| 121 | +/// // or @include react-md-button; |
| 122 | +/// @include react-md-utils; |
| 123 | +/// |
| 124 | +/// @example scss - Does not include `CircularProgress` size<!-- no-compile --> |
| 125 | +/// // bad example since `@react-md/progress` was not imported |
| 126 | +/// @import '~@react-md/button/dist/mixins'; |
| 127 | +/// @import '~@react-md/utils/dist/mixins'; |
| 128 | +/// |
| 129 | +/// // or @include react-md-button; |
| 130 | +/// @include react-md-utils; |
| 131 | +/// |
| 132 | +/// @example scss - Opt-out of `CircularProgress` size<!-- no-compile --> |
| 133 | +/// @import '~@react-md/button/dist/mixins'; |
| 134 | +/// @import '~@react-md/progress/dist/mixins'; |
| 135 | +/// @import '~@react-md/utils/dist/mixins'; |
| 136 | +/// |
| 137 | +/// // manually set it to `null` to prevent it from being added |
| 138 | +/// $rmd-button-circular-progress-size: null; |
| 139 | +/// |
| 140 | +/// // or @include react-md-button; |
| 141 | +/// @include react-md-utils; |
| 142 | +/// |
| 143 | +/// @since 2.3.0 |
| 144 | +/// @type String|Number |
| 145 | +$rmd-button-circular-progress-size: rmd-icon-theme-var(size) !default; |
| 146 | + |
106 | 147 | /// A Map of floating position styles to create. Each key will be made into a |
107 | 148 | /// className by `&--floating-#{$key}` and each value will parsed as a style |
108 | 149 | /// map. If you want to remove positions, override this variable with only the |
|
0 commit comments