@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.
package/dist/web.esm.js
CHANGED
|
@@ -944,6 +944,8 @@ var ButtonView = function ButtonView(_ref) {
|
|
|
944
944
|
effect = _ref$effect === void 0 ? 'default' : _ref$effect,
|
|
945
945
|
isHovered = _ref.isHovered,
|
|
946
946
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
947
|
+
var _useTheme = useTheme(),
|
|
948
|
+
getColor = _useTheme.getColor;
|
|
947
949
|
var isActive = !(isDisabled || isLoading);
|
|
948
950
|
var defaultNativeProps = {
|
|
949
951
|
disabled: !isActive
|
|
@@ -951,7 +953,7 @@ var ButtonView = function ButtonView(_ref) {
|
|
|
951
953
|
var buttonColor = isActive ? colorScheme : 'theme.disabled';
|
|
952
954
|
var hovering = isHovered && effect === 'hover';
|
|
953
955
|
var reverse = isHovered && effect === 'reverse';
|
|
954
|
-
var isLight = contrast(buttonColor) == 'light';
|
|
956
|
+
var isLight = contrast(getColor(buttonColor)) == 'light';
|
|
955
957
|
var ButtonVariants = {
|
|
956
958
|
filled: {
|
|
957
959
|
// Defines CSS properties for 'link' variant of the button with conditional styles based on reverse state, includes text decoration.
|