diff --git a/x-pack/legacy/plugins/epm/common/types.ts b/x-pack/legacy/plugins/epm/common/types.ts index 1bdbf31df8fe5..c969cb202966a 100644 --- a/x-pack/legacy/plugins/epm/common/types.ts +++ b/x-pack/legacy/plugins/epm/common/types.ts @@ -40,12 +40,7 @@ export type ServiceName = 'kibana' | 'elasticsearch'; export type RequirementVersion = string; export interface ServiceRequirements { - version: RequirementVersionRange; -} - -export interface RequirementVersionRange { - min: RequirementVersion; - max: RequirementVersion; + versions: string; } // from /categories diff --git a/x-pack/legacy/plugins/epm/public/components/content_collapse.tsx b/x-pack/legacy/plugins/epm/public/components/content_collapse.tsx index 4d70d506a2656..e855136b43a0a 100644 --- a/x-pack/legacy/plugins/epm/public/components/content_collapse.tsx +++ b/x-pack/legacy/plugins/epm/public/components/content_collapse.tsx @@ -5,29 +5,29 @@ */ import React, { useState, useRef, useLayoutEffect, Fragment, useCallback } from 'react'; import { EuiButtonEmpty, EuiSpacer, EuiButton, EuiHorizontalRule } from '@elastic/eui'; -import euiStyled from '../../../../common/eui_styled_components'; +import styled from 'styled-components'; -const BottomFade = euiStyled.div` -width: 100%; -background: ${props => - `linear-gradient(${props.theme.eui.euiColorEmptyShade}00 0%, ${props.theme.eui.euiColorEmptyShade} 100%)`}; -margin-top: -${props => parseInt(props.theme.eui.spacerSizes.xl, 10) * 2}px; -height: ${props => parseInt(props.theme.eui.spacerSizes.xl, 10) * 2}px; -position: absolute; +const BottomFade = styled.div` + width: 100%; + background: ${props => + `linear-gradient(${props.theme.eui.euiColorEmptyShade}00 0%, ${props.theme.eui.euiColorEmptyShade} 100%)`}; + margin-top: -${props => parseInt(props.theme.eui.spacerSizes.xl, 10) * 2}px; + height: ${props => parseInt(props.theme.eui.spacerSizes.xl, 10) * 2}px; + position: absolute; `; -const ContentCollapseContainer = euiStyled.div` -position: relative; +const ContentCollapseContainer = styled.div` + position: relative; `; -const CollapseButtonContainer = euiStyled.div` -display: inline-block; -background-color: ${props => props.theme.eui.euiColorGhost}; -position: absolute; -left: 50%; -transform: translateX(-50%); -top: ${props => parseInt(props.theme.eui.euiButtonHeight, 10) / 2}px; +const CollapseButtonContainer = styled.div` + display: inline-block; + background-color: ${props => props.theme.eui.euiColorGhost}; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: ${props => parseInt(props.theme.eui.euiButtonHeight, 10) / 2}px; `; -const CollapseButtonTop = euiStyled(EuiButtonEmpty)` -float: right; +const CollapseButtonTop = styled(EuiButtonEmpty)` + float: right; `; const CollapseButton = ({ diff --git a/x-pack/legacy/plugins/epm/public/components/requirements.tsx b/x-pack/legacy/plugins/epm/public/components/requirements.tsx index 329d4348edebf..4e81051e6a7af 100644 --- a/x-pack/legacy/plugins/epm/public/components/requirements.tsx +++ b/x-pack/legacy/plugins/epm/public/components/requirements.tsx @@ -5,13 +5,13 @@ */ import React, { Fragment } from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiTextColor, EuiTitle } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiTextColor, EuiTitle, EuiIcon, EuiText } from '@elastic/eui'; import styled from 'styled-components'; import { entries } from '../../common/type_utils'; import { RequirementsByServiceName } from '../../common/types'; import { ServiceTitleMap } from '../constants'; import { useCore } from '../hooks/use_core'; -import { VersionBadge } from './version_badge'; +import { Version } from './version'; export interface RequirementsProps { requirements: RequirementsByServiceName; @@ -21,15 +21,27 @@ export function Requirements(props: RequirementsProps) { const { requirements } = props; const { theme } = useCore(); - const Text = styled.span` - padding-bottom: ${theme.eui.paddingSizes.m}; + const FlexGroup = styled(EuiFlexGroup)` + padding: 0 0 ${theme.eui.paddingSizes.m} 0; + margin: 0; + `; + const StyledVersion = styled(Version)` + font-size: ${theme.eui.euiFontSizeXS}; `; - return ( - - Compatibility - + + + + + + + +

Elastic Stack Compatibility

+
+
+
+
{entries(requirements).map(([service, requirement]) => ( @@ -38,11 +50,7 @@ export function Requirements(props: RequirementsProps) { -
- - {' - '} - -
+
))} diff --git a/x-pack/legacy/plugins/epm/public/components/version_badge.tsx b/x-pack/legacy/plugins/epm/public/components/version.tsx similarity index 51% rename from x-pack/legacy/plugins/epm/public/components/version_badge.tsx rename to x-pack/legacy/plugins/epm/public/components/version.tsx index 431714008247a..6067673f39edb 100644 --- a/x-pack/legacy/plugins/epm/public/components/version_badge.tsx +++ b/x-pack/legacy/plugins/epm/public/components/version.tsx @@ -5,9 +5,18 @@ */ import React from 'react'; -import { EuiBadge } from '@elastic/eui'; +import styled from 'styled-components'; import { RequirementVersion } from '../../common/types'; -export function VersionBadge({ version }: { version: RequirementVersion }) { - return v{version}; +const CodeText = styled.span` + font-family: ${props => props.theme.eui.euiCodeFontFamily}; +`; +export function Version({ + className, + version, +}: { + className?: string; + version: RequirementVersion; +}) { + return {version}; } diff --git a/x-pack/legacy/plugins/epm/public/screens/detail/header.tsx b/x-pack/legacy/plugins/epm/public/screens/detail/header.tsx index 76c1a558493e2..33dbbc148dac6 100644 --- a/x-pack/legacy/plugins/epm/public/screens/detail/header.tsx +++ b/x-pack/legacy/plugins/epm/public/screens/detail/header.tsx @@ -23,7 +23,7 @@ import { useTrackedPromise } from '../../../../infra/public/utils/use_tracked_pr import { installPackage } from '../../data'; import { PLUGIN } from '../../../common/constants'; import { PackageInfo } from '../../../common/types'; -import { VersionBadge } from '../../components/version_badge'; +import { Version } from '../../components/version'; import { IconPanel } from '../../components/icon_panel'; import { useBreadcrumbs, useCore, useLinks } from '../../hooks'; import { CenterColumn, LeftColumn, RightColumn } from './layout'; @@ -42,7 +42,12 @@ export function Header(props: HeaderProps) { `; const Text = styled.span` - margin-right: ${theme.eui.spacerSizes.xl}; + margin-right: ${theme.eui.euiSizeM}; + `; + + const StyledVersion = styled(Version)` + font-size: ${theme.eui.euiFontSizeS}; + color: ${theme.eui.euiColorDarkShade}; `; return ( @@ -60,7 +65,7 @@ export function Header(props: HeaderProps) {

{title} - +