@app-studio/web 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -951,6 +951,8 @@ var ButtonView = function ButtonView(_ref) {
|
|
|
951
951
|
effect = _ref$effect === void 0 ? 'default' : _ref$effect,
|
|
952
952
|
isHovered = _ref.isHovered,
|
|
953
953
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
954
|
+
var _useTheme = appStudio.useTheme(),
|
|
955
|
+
getColor = _useTheme.getColor;
|
|
954
956
|
var isActive = !(isDisabled || isLoading);
|
|
955
957
|
var defaultNativeProps = {
|
|
956
958
|
disabled: !isActive
|
|
@@ -958,7 +960,7 @@ var ButtonView = function ButtonView(_ref) {
|
|
|
958
960
|
var buttonColor = isActive ? colorScheme : 'theme.disabled';
|
|
959
961
|
var hovering = isHovered && effect === 'hover';
|
|
960
962
|
var reverse = isHovered && effect === 'reverse';
|
|
961
|
-
var isLight = contrast(buttonColor) == 'light';
|
|
963
|
+
var isLight = contrast(getColor(buttonColor)) == 'light';
|
|
962
964
|
var ButtonVariants = {
|
|
963
965
|
filled: {
|
|
964
966
|
// Defines CSS properties for 'link' variant of the button with conditional styles based on reverse state, includes text decoration.
|