office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
55 lines • 1.94 kB
JavaScript
import { normalize, getGlobalClassNames, FontSizes } from '../../Styling';
var GlobalClassNames = {
root: 'ms-DatePicker',
callout: 'ms-DatePicker-callout',
withLabel: 'ms-DatePicker-event--with-label',
withoutLabel: 'ms-DatePicker-event--without-label',
disabled: 'msDatePickerDisabled '
};
export var styles = function (props) {
var className = props.className, theme = props.theme, disabled = props.disabled, label = props.label, isDatePickerShown = props.isDatePickerShown;
var palette = theme.palette;
var classNames = getGlobalClassNames(GlobalClassNames, theme);
var DatePickerEvent = {
color: palette.neutralSecondary,
fontSize: FontSizes.icon,
lineHeight: '18px',
pointerEvents: 'none',
position: 'absolute',
right: '9px'
};
return {
root: [classNames.root, isDatePickerShown && 'is-open', normalize, className],
textField: [
{
position: 'relative',
selectors: {
'& input[readonly]': {
cursor: 'pointer'
},
input: {
selectors: {
'::-ms-clear': {
display: 'none'
}
}
}
}
}
],
callout: [classNames.callout],
icon: [
DatePickerEvent,
!label && [classNames.withoutLabel, { top: '7px' }],
label && [classNames.withLabel, { bottom: '5px' }],
!disabled && [
classNames.disabled,
{
pointerEvents: 'initial',
cursor: 'pointer'
}
]
]
};
};
//# sourceMappingURL=DatePicker.styles.js.map