-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed targetvalidation and added no results in boundary (#1768)
- Loading branch information
1 parent
0b6af4c
commit 2760c50
Showing
4 changed files
with
81 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...web/micro-ui-internals/packages/modules/campaign-manager/src/components/NoResultsFound.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import { useTranslation } from "react-i18next"; | ||
import { SVG } from "@egovernments/digit-ui-components"; | ||
|
||
const NoResultsFound = (props) => { | ||
const { t } = useTranslation(); | ||
const iconHeight = props?.height || 262; | ||
const iconWidth = props?.width || 336; | ||
return ( | ||
<div className={`digit-no-data-found ${props?.className ? props?.className : ""}`} style={props?.style}> | ||
<SVG.NoResultsFoundIcon height={iconHeight} width={iconWidth} /> | ||
<span className="digit-error-msg">{props?.text ? t(props?.text) : t("COMMON_NO_RESULTS_FOUND")}</span> | ||
</div> | ||
); | ||
}; | ||
NoResultsFound.propTypes = { | ||
style: PropTypes.object, | ||
className: PropTypes.string, | ||
height: PropTypes.number, // Prop for the height of the NoResultsFoundIcon | ||
width: PropTypes.number, // Prop for the width of the NoResultsFoundIcon | ||
}; | ||
|
||
// Default props for height and width | ||
NoResultsFound.defaultProps = { | ||
height: 262, | ||
width: 336, | ||
}; | ||
export default NoResultsFound; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters