@uifabric/experiments
Version:
Experimental React components for building experiences for Microsoft 365.
50 lines • 1.97 kB
JavaScript
import { __assign } from "tslib";
import { getGlobalClassNames, getTheme, HighContrastSelector, getHighContrastNoAdjustStyle } from '@uifabric/styling';
var GlobalClassNames = {
actionButton: 'ms-FloatingSuggestionsHeaderFooterItem-actionButton',
buttonSelected: 'ms-FloatingSuggestionsHeaderFooterItem-buttonSelected',
};
export var getStyles = function (props) {
var _a, _b, _c;
var theme = getTheme();
if (!theme) {
throw new Error('theme is undefined or null in FloatingSuggestionsItem getStyles function.');
}
var palette = theme.palette;
var classNames = getGlobalClassNames(GlobalClassNames, theme);
return {
actionButton: [
classNames.actionButton,
{
width: '100%',
padding: '0px',
minWidth: '0',
height: '100%',
selectors: (_a = {},
_a[HighContrastSelector] = {
color: 'WindowText',
},
_a['&:hover'] = {
background: palette.neutralLighter,
},
_a),
},
],
buttonSelected: [
classNames.buttonSelected,
{
background: palette.themeLighter,
selectors: (_b = {
'&:hover': (_c = {
background: palette.themeLight
},
_c[HighContrastSelector] = __assign({ background: 'Highlight', color: 'HighlightText' }, getHighContrastNoAdjustStyle()),
_c)
},
_b[HighContrastSelector] = __assign({ background: 'Highlight', color: 'HighlightText' }, getHighContrastNoAdjustStyle()),
_b),
},
],
};
};
//# sourceMappingURL=FloatingSuggestionsHeaderFooterItem.styles.js.map