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

css variable added using fetcher utility(OPEN SRC) #2493

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
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { useSelector } from "react-redux";
import { ListGroup } from "react-bootstrap";
import { CustomPill,DeleteIcon } from "@formsflow/components";
import PropTypes from 'prop-types';
import { HelperServices } from "@formsflow/service";
import { HelperServices, StyleServices } from "@formsflow/service";

const RoleSelector = ({
allRoles = [],
selectedRoles = [],
setSelectedRoles,
openByDefault = false,
}) => {
const primaryColor = StyleServices.getCSSVariable('primary');
const [roleInput, setRoleInput] = useState("");
const [filteredRoles, setFilteredRoles] = useState([]);
const [isDropdownOpen, setIsDropdownOpen] = useState(false); // To control dropdown visibility
Expand Down Expand Up @@ -74,7 +75,7 @@ const RoleSelector = ({
<CustomPill
key={role + index}
label={HelperServices.removeTenantKeyFromData(role,tenantKey)}
icon={<DeleteIcon color="#253DF4" />}
icon={<DeleteIcon color={primaryColor} />}
bg="primary"
onClick={() => removeRole(role)}
/>
Expand Down
6 changes: 4 additions & 2 deletions forms-flow-web/src/components/Modals/ActionModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
CustomInfo,
CustomButton,
} from "@formsflow/components";
import { StyleServices } from "@formsflow/service";

const ActionModal = React.memo(
({
Expand All @@ -21,6 +22,7 @@ const ActionModal = React.memo(
isCreate,
isMigrated
}) => {
const primaryColor = StyleServices.getCSSVariable('primary');
const handleAction = (actionType) => {
onAction(actionType);
onClose();
Expand All @@ -46,7 +48,7 @@ const ActionModal = React.memo(
<div> Action</div>
</Modal.Title>
<div className="d-flex align-items-center">
<CloseIcon onClick={onClose} color="#253DF4" />
<CloseIcon onClick={onClose} color={primaryColor} />
</div>
</Modal.Header>
<Modal.Body className="action-modal-body">
Expand All @@ -58,7 +60,7 @@ const ActionModal = React.memo(
size="sm"
label="Duplicate"
disabled={published || !isMigrated}
icon={<DuplicateIcon color="#253DF4" />}
icon={<DuplicateIcon color={primaryColor} />}
className=""
dataTestid="duplicate-form-button"
ariaLabel="Duplicate Button"
Expand Down
8 changes: 6 additions & 2 deletions forms-flow-web/src/components/Modals/TaskVariableModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
saveFormProcessMapperPut,
} from "../../apiManager/services/processServices";
import _ from "lodash";
import { StyleServices } from "@formsflow/service";


// Filter out applicationId and applicationStatus
const ignoreKeywords = new Set([
Expand All @@ -31,6 +33,8 @@ import _ from "lodash";
//TBD in case of Bundle form display
const PillList = React.memo(({ alternativeLabels, onRemove }) => {
const { t } = useTranslation();
const primaryColor = StyleServices.getCSSVariable('primary');
const secondaryColor = StyleServices.getCSSVariable('secondary');

const filteredVariablePills = Object.values(alternativeLabels).filter(
({ key }) => !ignoreKeywords.has(key)
Expand All @@ -43,8 +47,8 @@ const PillList = React.memo(({ alternativeLabels, onRemove }) => {
<CustomPill
key={key}
label={altVariable || labelOfComponent}
icon={<CloseIcon color="#253DF4" data-testid="pill-remove-icon" />}
bg="#E7E9FE"
icon={<CloseIcon color={primaryColor} data-testid="pill-remove-icon" />}
bg={secondaryColor}
onClick={() => onRemove(key)}
secondaryLabel={key}
/>
Expand Down
Loading