@fluentui/react-northstar
Version:
A themable React component library.
41 lines (39 loc) • 1.47 kB
JavaScript
import { buttonBehavior } from '@fluentui/accessibility';
import * as customPropTypes from '@fluentui/react-proptypes';
import * as PropTypes from 'prop-types';
import { compose } from '@fluentui/react-bindings';
import { commonPropTypes } from '../../utils';
import { Button } from '../Button/Button';
export var attachmentActionClassName = 'ui-attachment__action';
/**
* An AttachmentAction provides a slot for actions in the Attachment.
*/
export var AttachmentAction = /*#__PURE__*/function () {
var AttachmentAction = compose(Button, {
className: attachmentActionClassName,
displayName: 'AttachmentAction',
overrideStyles: true,
shorthandConfig: {
mappedProp: 'content'
}
});
AttachmentAction.defaultProps = {
accessibility: buttonBehavior,
as: 'button'
};
AttachmentAction.propTypes = Object.assign({}, commonPropTypes.createCommon({
content: 'shorthand'
}), {
disabled: PropTypes.bool,
icon: customPropTypes.shorthandAllowingChildren,
iconPosition: PropTypes.oneOf(['before', 'after']),
loader: customPropTypes.itemShorthandWithoutJSX,
loading: PropTypes.bool,
onClick: PropTypes.func,
onFocus: PropTypes.func,
primary: customPropTypes.every([customPropTypes.disallow(['secondary']), PropTypes.bool]),
secondary: customPropTypes.every([customPropTypes.disallow(['primary']), PropTypes.bool])
});
return AttachmentAction;
}();
//# sourceMappingURL=AttachmentAction.js.map