Skip to content

Commit

Permalink
Make the steps diagram honor the theme (#1538)
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Craig Perkins <cwperx@amazon.com>
Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com>
(cherry picked from commit 20ba268)
  • Loading branch information
AMoo-Miki authored and github-actions[bot] committed Aug 10, 2023
1 parent a5e35e3 commit 6dbcd1c
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 105 deletions.
42 changes: 42 additions & 0 deletions public/apps/configuration/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,45 @@
.limit-width-input {
max-width: 400px;
}

.security-steps-diagram {
height: 114px;
position: relative;

&::before,
&::after {
content: "";
position: absolute;
width: 100%;
height: 100%;
}

&::before {
mask: url("../../assets/get_started_layer_1.svg") center / contain no-repeat;
background: $euiColorDarkestShade;
}

&::after {
mask: url("../../assets/get_started_layer_2.svg") center / contain no-repeat;
background: $euiColorPrimary;
}

@supports not (mask: center / contain no-repeat) {
/* stylelint-disable property-no-vendor-prefix */
&::before,
&::after {
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: contain;
-webkit-mask-position: center;
}

&::before {
-webkit-mask-image: url("../../assets/get_started_layer_1.svg");
}

&::after {
-webkit-mask-image: url("../../assets/get_started_layer_2.svg");
}
/* stylelint-enable property-no-vendor-prefix */
}
}
13 changes: 1 addition & 12 deletions public/apps/configuration/panels/get-started.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
EuiCode,
EuiFlexGroup,
EuiFlexItem,
EuiImage,
EuiPageHeader,
EuiPanel,
EuiSpacer,
Expand All @@ -31,7 +30,6 @@ import { FormattedMessage } from '@osd/i18n/react';
import { flow } from 'lodash';
import { HashRouter as Router, Route } from 'react-router-dom';
import { AppDependencies } from '../../types';
import securityStepsDiagram from '../../../assets/get_started.svg';
import { buildHashUrl, buildUrl } from '../utils/url-builder';
import { Action, ResourceType, RouteItem } from '../types';
import { API_ENDPOINT_CACHE, DocLinks } from '../constants';
Expand Down Expand Up @@ -189,16 +187,7 @@ export function GetStarted(props: AppDependencies) {
</EuiText>

<EuiSpacer size="l" />
{props.config.ui.backend_configurable && (
<div className="text-center">
<EuiImage
size="xl"
alt="Three steps to set up your security"
url={securityStepsDiagram}
style={{ maxWidth: '100%', height: 'auto', width: 'auto' }}
/>
</div>
)}
{props.config.ui.backend_configurable && <div className={'security-steps-diagram'} />}

<EuiSpacer size="l" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,21 +279,8 @@ exports[`Get started (landing page) renders when backend configuration is enable
size="l"
/>
<div
className="text-center"
>
<EuiImage
alt="Three steps to set up your security"
size="xl"
style={
Object {
"height": "auto",
"maxWidth": "100%",
"width": "auto",
}
}
url="test-file-stub"
/>
</div>
className="security-steps-diagram"
/>
<EuiSpacer
size="l"
/>
Expand Down
Loading

0 comments on commit 6dbcd1c

Please sign in to comment.