@shoplflow/base 0.30.8 → 0.31.0
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/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2034,6 +2034,7 @@ var StyledDropdownButton = styled6__default.default.button`
|
|
|
2034
2034
|
background-color: ${exports.colorTokens.neutral0};
|
|
2035
2035
|
${({ sizeVar }) => sizeVar && getDropdownStyleBySizeVar(sizeVar)};
|
|
2036
2036
|
${({ disabled }) => disabled && react$1.css`
|
|
2037
|
+
background-color: ${exports.colorTokens.neutral100};
|
|
2037
2038
|
cursor: not-allowed;
|
|
2038
2039
|
`}
|
|
2039
2040
|
`;
|
|
@@ -2165,6 +2166,15 @@ var DropdownButton = React3.forwardRef(
|
|
|
2165
2166
|
const handleOnMouseLeave = () => {
|
|
2166
2167
|
setIsHovered(false);
|
|
2167
2168
|
};
|
|
2169
|
+
const getTextColor = ({ value: value2, disabled: disabled2 }) => {
|
|
2170
|
+
if (disabled2) {
|
|
2171
|
+
return "neutral350";
|
|
2172
|
+
}
|
|
2173
|
+
if (!value2) {
|
|
2174
|
+
return "neutral400";
|
|
2175
|
+
}
|
|
2176
|
+
return "neutral700";
|
|
2177
|
+
};
|
|
2168
2178
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2169
2179
|
InputWrapper,
|
|
2170
2180
|
{
|
|
@@ -2182,7 +2192,7 @@ var DropdownButton = React3.forwardRef(
|
|
|
2182
2192
|
exports.Text,
|
|
2183
2193
|
{
|
|
2184
2194
|
typography: getDropdownFontSizeBySizeVar(sizeVar),
|
|
2185
|
-
color: value
|
|
2195
|
+
color: getTextColor({ value, disabled }),
|
|
2186
2196
|
textOverflow: "ellipsis",
|
|
2187
2197
|
lineClamp: 1,
|
|
2188
2198
|
children: placeholder
|