@hitachivantara/uikit-react-core
Version:
Core React components for the NEXT Design System.
50 lines (49 loc) • 1.22 kB
JavaScript
import { createClasses } from "@hitachivantara/uikit-react-utils";
import { theme } from "@hitachivantara/uikit-styles";
import { staticClasses as staticClasses$1 } from "../Button/Button.styles.js";
import "../Button/Button.js";
const disabledStyle = {
[`&,&.${staticClasses$1.subtle},&.${staticClasses$1.ghost}`]: {
backgroundColor: theme.colors.bgDisabled,
borderColor: theme.colors.bgDisabled,
"&:hover": { backgroundColor: theme.colors.bgDisabled }
}
};
const { staticClasses, useClasses } = createClasses("HvDropdownButton", {
root: {
userSelect: "none",
position: "relative",
[`&:not(.${staticClasses$1.icon})`]: {
width: "100%",
minWidth: "unset",
justifyContent: "flex-start",
paddingLeft: theme.space.xs
}
},
disabled: {
...disabledStyle
},
readOnly: {
userSelect: "text",
...disabledStyle
},
open: {
backgroundColor: theme.colors.bgContainer
},
selection: {
color: "inherit",
flex: 1,
textAlign: "start",
overflow: "auto",
textOverflow: "ellipsis",
whiteSpace: "nowrap"
},
placeholder: {},
arrowContainer: {
marginRight: theme.spacing(-2)
}
});
export {
staticClasses,
useClasses
};