@fluentui/react-northstar
Version:
A themable React component library.
34 lines (32 loc) • 1.01 kB
JavaScript
import { compose } from '@fluentui/react-bindings';
import * as customPropTypes from '@fluentui/react-proptypes';
import { commonPropTypes } from '../../utils';
import { Box } from '../Box/Box';
export var buttonContentClassName = 'ui-button__content';
/**
* A ButtonContent allows a user to have a dedicated component that can be targeted from the theme.
*/
export var ButtonContent = /*#__PURE__*/function () {
var ButtonContent = compose(Box, {
className: buttonContentClassName,
displayName: 'ButtonContent',
mapPropsToStylesProps: function mapPropsToStylesProps(props) {
return {
size: props.size
};
},
handledProps: ['size'],
overrideStyles: true,
shorthandConfig: {
mappedProp: 'content'
}
});
ButtonContent.defaultProps = {
as: 'span'
};
ButtonContent.propTypes = Object.assign({}, commonPropTypes.createCommon(), {
size: customPropTypes.size
});
return ButtonContent;
}();
//# sourceMappingURL=ButtonContent.js.map