Skip to content

Commit

Permalink
fix: copy and image updates (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminRuby authored Sep 15, 2022
1 parent 959b8b0 commit c3b2bdf
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 559 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@boomerang-io/carbon-addons-boomerang-react",
"description": "Carbon Addons for Boomerang apps",
"version": "2.0.10",
"version": "2.0.11-beta.2",
"author": {
"name": "Tim Bula",
"email": "timrbula@gmail.com"
Expand Down Expand Up @@ -206,4 +206,4 @@
"requireCleanWorkingDir": false
}
}
}
}
28 changes: 9 additions & 19 deletions src/components/GdprRedirectModal/GdprRedirectModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import { ComposedModal, Button } from 'carbon-components-react';
import PropTypes from 'prop-types';
import { ModalHeader, ModalBody, ModalFooter } from 'carbon-components-react';
import { settings } from 'carbon-components';

import { USER_STATUS } from './constants';
import CastleDrawBridge from './assets/CastleDrawBridge';
import CastleNoDoor from './assets/castle_nodoor';

const { prefix } = settings;

Expand All @@ -15,10 +12,12 @@ class GdprRedirectModal extends Component {
isOpen: PropTypes.bool,
baseLaunchEnvUrl: PropTypes.string.isRequired,
user: PropTypes.object.isRequired,
platformName: PropTypes.string
};

static defaultProps = {
isOpen: false,
platformName: "the platform"
};

handleOnSubmit = () => {
Expand All @@ -32,22 +31,14 @@ class GdprRedirectModal extends Component {
};

render() {
const { isOpen, user } = this.props;
const { isOpen, user, platformName } = this.props;

const pendingDeletion = user.status === USER_STATUS.PENDING_DELETION;
const pendingDeletion = user?.status === USER_STATUS.PENDING_DELETION;
const contentText = pendingDeletion
? 'We’re working on removing your account and personal information from our systems.'
: 'We’re sorry to interrupt, but we need you to agree to our new privacy statement.';
const smallText = pendingDeletion
? 'Please allow up to 1 month (as mandated by GDPR regulations) for us to process your request.'
: 'We’ll bring you back right here after.';
const contentImg = pendingDeletion ? (
<CastleNoDoor className={`${prefix}--bmrg-redirect__img`} alt="redirect" />
) : (
<CastleDrawBridge className={`${prefix}--bmrg-redirect__img`} alt="redirect" />
);
? `We’re working on removing your account and personal information from ${platformName}. Please allow up to 1 month (as mandated by GDPR regulations) for us to complete your request.`
: 'Before continuing, we need you to consent to the Privacy Statement.';

const buttonText = pendingDeletion ? 'Boomerang' : 'View Consent Form';
const buttonText = pendingDeletion ? 'Launchpad' : 'View Privacy Statement';

return (
<div className={`${prefix}--bmrg-redirect-container`}>
Expand All @@ -58,12 +49,11 @@ class GdprRedirectModal extends Component {
}}
>
<div ref={(node) => (this.node = node)}>
<ModalHeader title="Hi Mate," />
<ModalHeader title="Our Privacy Statement" />
<ModalBody>
<span className={`${prefix}--bmrg-redirect__body`}>
{contentText} {smallText}
{contentText}
</span>
{contentImg}
</ModalBody>
<ModalFooter>
<Button kind="primary" onClick={this.handleOnSubmit}>
Expand Down
10 changes: 2 additions & 8 deletions src/components/GdprRedirectModal/_gdprRedirectModal.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
@include exports('addons-bmrg-gdprRedirect') {
.#{$prefix}--bmrg-redirect__img {
width: 100%;
height: 10rem;
margin-top: 1.5rem;
}

.#{$prefix}--bmrg-redirect__body {
height: 1.25rem;
color: #9fa5ad;
font-size: 0.875rem;
font-weight: 600;
height: 1.25rem;
line-height: 1.25rem;
text-transform: initial;
margin-bottom: 1.45rem;
}

.#{$prefix}--bmrg-redirect-container {
.#{$prefix}--modal-container {
height: 12rem;
max-height: 28rem;
}
}
Expand Down
121 changes: 0 additions & 121 deletions src/components/GdprRedirectModal/assets/CastleDrawBridge.js

This file was deleted.

Loading

0 comments on commit c3b2bdf

Please sign in to comment.