UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

48 lines 2.04 kB
define(["require", "exports", "../../Styling"], function (require, exports, Styling_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var GlobalClassNames = { root: 'ms-DetailsRow-check', isDisabled: 'ms-DetailsRow-check--isDisabled', isHeader: 'ms-DetailsRow-check--isHeader' }; exports.getStyles = function (props) { var theme = props.theme, className = props.className, isHeader = props.isHeader, selected = props.selected, anySelected = props.anySelected, canSelect = props.canSelect, compact = props.compact, isVisible = props.isVisible; var classNames = Styling_1.getGlobalClassNames(GlobalClassNames, theme); var isCheckVisible = isVisible || selected || anySelected; return { root: [classNames.root, className], check: [ !canSelect && [classNames.isDisabled, { visibility: 'hidden' }], isHeader && classNames.isHeader, Styling_1.getFocusStyle(theme), { display: 'flex', alignItems: 'center', justifyContent: 'center', cursor: 'default', boxSizing: 'border-box', verticalAlign: 'top', background: 'none', backgroundColor: 'transparent', border: 'none', opacity: 0, height: compact || isHeader ? 32 : 40, width: 40, padding: 0, margin: 0, selectors: { '&:hover': { opacity: 1 } } }, isCheckVisible && { opacity: 1 } ], isDisabled: [] }; }; }); //# sourceMappingURL=DetailsRowCheck.styles.js.map