@app-studio/web 0.7.3 → 0.7.5

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,12 +960,12 @@ 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.
965
967
  backgroundColor: reverse ? 'transparent' : buttonColor,
966
- color: reverse && !isLight ? buttonColor : 'color.white',
968
+ color: reverse ? isLight ? 'color.white' : buttonColor : isLight ? buttonColor : 'color.white',
967
969
  borderWidth: 1,
968
970
  borderStyle: 'solid',
969
971
  borderColor: reverse ? buttonColor : 'transparent'
@@ -990,7 +992,7 @@ var ButtonView = function ButtonView(_ref) {
990
992
  },
991
993
  ghost: {
992
994
  backgroundColor: reverse ? buttonColor : 'transparent',
993
- color: reverse && !isLight ? 'color.white' : buttonColor,
995
+ color: reverse ? 'color.white' : buttonColor,
994
996
  borderWidth: 1,
995
997
  borderStyle: 'solid',
996
998
  borderColor: reverse ? buttonColor : 'transparent'