UNPKG

@fluentui/react-northstar

Version:
40 lines (38 loc) 1.46 kB
import * as React from 'react'; import { buttonBehavior } from '@fluentui/accessibility'; import { compose } from '@fluentui/react-bindings'; import { ChevronEndIcon, ChevronStartIcon } from '@fluentui/react-icons-northstar'; import { Button } from '../Button/Button'; export var datepickerCalendarHeaderActionClassName = 'ui-datepicker__calendarheaderaction'; /** * A DatepickerCalendarHeaderAction is used to display action button for DatepickerCalendarHeader. */ export var DatepickerCalendarHeaderAction = /*#__PURE__*/function () { var DatepickerCalendarHeaderAction = compose(Button, { className: datepickerCalendarHeaderActionClassName, displayName: 'DatepickerCalendarHeaderAction', handledProps: ['direction', 'disabledNavigatableButton'], mapPropsToStylesProps: function mapPropsToStylesProps(p) { return { iconOnly: true, text: true, disabled: p.disabledNavigatableButton }; }, slotProps: function slotProps(props) { return { icon: { content: props.direction === 'next' ? /*#__PURE__*/React.createElement(ChevronEndIcon, null) : /*#__PURE__*/React.createElement(ChevronStartIcon, null) } }; } }); DatepickerCalendarHeaderAction.defaultProps = { as: 'button', accessibility: buttonBehavior, size: 'medium', icon: {} }; return DatepickerCalendarHeaderAction; }(); //# sourceMappingURL=DatepickerCalendarHeaderAction.js.map