Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrated panelcard component #732

Merged
merged 3 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions micro-ui/web/micro-ui-internals/example/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
href="https://unpkg.com/@egovernments/[email protected]/dist/index.css"
/> -->
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />

<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<!-- added below css for hcm-workbench module inclusion-->

<!-- <link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" /> -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-css",
"version": "1.0.46-campaign",
"version": "1.0.47-campaign",
"license": "MIT",
"main": "dist/index.css",
"author": "Jagankumar <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,23 @@
header {
@extend .typography.text-heading-xl;
}


.digit-popup-wrap {
background: rgba(0, 0, 0, 0.7);
@apply flex fixed w-full h-full overflow-auto top-0 left-0 min-h-screen;
z-index: 10000;
max-width: 100% !important;
max-height: 100% !important;
}
Comment on lines +139 to +145
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure the .digit-popup-wrap class's styles are consistent and necessary. The max-width and max-height properties are set to 100%, which might be redundant due to the w-full and h-full classes.

- max-width: 100% !important;
- max-height: 100% !important;

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
.digit-popup-wrap {
background: rgba(0, 0, 0, 0.7);
@apply flex fixed w-full h-full overflow-auto top-0 left-0 min-h-screen;
z-index: 10000;
max-width: 100% !important;
max-height: 100% !important;
}
.digit-popup-wrap {
background: rgba(0, 0, 0, 0.7);
@apply flex fixed w-full h-full overflow-auto top-0 left-0 min-h-screen;
z-index: 10000;
}


@screen dt {
.digit-popup-wrap {
background: rgba(0, 0, 0, 0.7);
@apply min-h-screen;
}
}

.digit-popup-close-icon {
@apply flex justify-end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@egovernments/digit-ui-react-components": "1.8.1-beta.23",
"@egovernments/digit-ui-components": "0.0.1-beta.28",
"@egovernments/digit-ui-components": "0.0.1-beta.30",
"@rjsf/core": "5.10.0",
"@rjsf/utils": "5.10.0",
"@rjsf/validator-ajv8": "5.10.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { useState } from "react";
import React, { useState, Fragment } from "react";
import { Link, useHistory, useLocation } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { Banner, Card, LinkLabel, ArrowLeftWhite, ActionBar, SubmitBar } from "@egovernments/digit-ui-react-components";
import { ActionBar, SubmitBar } from "@egovernments/digit-ui-react-components";
import { PanelCard } from "@egovernments/digit-ui-components";

const Response = () => {
const { t } = useTranslation();
Expand All @@ -22,40 +23,42 @@ const Response = () => {
}
};

const children = [
<div style={{ display: "flex" }} key="response-text">
{state?.boldText ? (
<p style={{ margin: "0rem" }}>
{t(state?.preText)}
<b> {t(state?.boldText)} </b>
{t(state?.postText)}
</p>
) : (
t(state?.text, { CAMPAIGN_ID: campaignId })
)}
</div>,
];

return (
<Card>
<Banner
successful={isResponseSuccess}
<>
<PanelCard
type={isResponseSuccess ? "success" : "error"}
message={t(state?.message)}
multipleResponseIDs={[campaignId]}
response={campaignId}
info={t(state?.info)}
whichSvg={`${isResponseSuccess ? "tick" : null}`}
footerChildren={[]}
children={children}
/>
<Card style={{ border: "none", boxShadow: "none", padding: "0", paddingBottom: "1rem" }}>
<div style={{ display: "flex", marginBottom: "0.75rem" }}>
{state?.boldText ? (
<p>
{t(state?.preText)}
<b> {t(state?.boldText)} </b>
{t(state?.postText)}
</p>
) : (
t(state?.text, { CAMPAIGN_ID: campaignId })
)}
</div>
{isMobile ? (
{isMobile ? (
<Link to={state?.actionLink ? state?.actionLink : `/${window.contextPath}/employee/`}>
<SubmitBar label={state?.actionLabel ? t(state?.actionLabel) : t("ES_CAMPAIGN_RESPONSE_ACTION")} />
</Link>
) : (
<ActionBar>
<Link to={state?.actionLink ? state?.actionLink : `/${window.contextPath}/employee/`}>
<SubmitBar label={state?.actionLabel ? t(state?.actionLabel) : t("ES_CAMPAIGN_RESPONSE_ACTION")} />
</Link>
) : (
<ActionBar>
<Link to={state?.actionLink ? state?.actionLink : `/${window.contextPath}/employee/`}>
<SubmitBar label={state?.actionLabel ? t(state?.actionLabel) : t("ES_CAMPAIGN_RESPONSE_ACTION")} />
</Link>
</ActionBar>
)}
</Card>
</Card>
</ActionBar>
)}
</>
);
};

Expand Down
4 changes: 2 additions & 2 deletions micro-ui/web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].15/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].21/dist/index.css" />
<!-- added below css for hcm-workbench module inclusion-->
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].46-campaign/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].47-campaign/dist/index.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#00bcd1" />
<title>DIGIT</title>
Expand Down
Loading