feature/IO-2970-Production-Board-Unassigned-Filter - Implementation

This commit is contained in:
Dave Richer
2025-01-31 13:23:36 -05:00
parent f409acc7fd
commit ac2fbaf6f7
8 changed files with 46 additions and 18 deletions

View File

@@ -1,4 +1,3 @@
import React from "react";
import PropTypes from "prop-types";
import { Button } from "antd";
import { useLocation } from "react-router-dom";
@@ -28,7 +27,6 @@ const mapStateToProps = createStructuredSelector({
* @param {Object} [props.buttonStyle={}] - Style object for the Ant Design button.
* @param {Object} [props.buttonIconStyle={}] - Style object for the icon within the button.
* @param {string} [props.linkText] - Text to display on the button or link.
* @param {Object} [props.additionalProps] - Additional props to pass to the rendered component.
* @returns {React.ReactElement} A button or text link for sharing to Microsoft Teams.
*/
const ShareToTeamsComponent = ({
@@ -40,8 +38,7 @@ const ShareToTeamsComponent = ({
noIconStyle = {},
buttonStyle = {},
buttonIconStyle = {},
linkText,
...additionalProps
linkText
}) => {
const location = useLocation();
const { t } = useTranslation();
@@ -87,7 +84,7 @@ const ShareToTeamsComponent = ({
if (noIcon) {
return (
<div style={{ cursor: "pointer", ...noIconStyle }} onClick={handleShare} {...additionalProps}>
<div style={{ cursor: "pointer", ...noIconStyle }} onClick={handleShare}>
{!linkText ? t("general.actions.sharetoteams") : linkText}
</div>
);
@@ -104,7 +101,6 @@ const ShareToTeamsComponent = ({
icon={<SiMicrosoftteams style={{ color: "#FFFFFF", ...buttonIconStyle }} />}
onClick={handleShare}
title={linkText === null ? t("general.actions.sharetoteams") : linkText}
{...additionalProps}
/>
);
};
@@ -117,8 +113,7 @@ ShareToTeamsComponent.propTypes = {
noIconStyle: PropTypes.object,
buttonStyle: PropTypes.object,
buttonIconStyle: PropTypes.object,
linkText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
additionalProps: PropTypes.oneOfType([PropTypes.object, PropTypes.node])
linkText: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
};
export default connect(mapStateToProps)(ShareToTeamsComponent);