Skip to content

Commit

Permalink
Merge pull request #1726 from eijawerner/fix-icon-text-not-on-same-line
Browse files Browse the repository at this point in the history
Fixed issues where icon and text not on the same line
  • Loading branch information
eijawerner authored Apr 5, 2022
2 parents 96cc787 + eff7949 commit 27c2215
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function DetailsPane({
<>
<PaneHeader>
<PaneTitle>
{upperFirst(vizItem.type)} Properties{' '}
<span>{`${upperFirst(vizItem.type)} Properties`}</span>
<ClipboardCopier
textToCopy={allItemProperties
.map(prop => `${prop.key}: ${prop.value}`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ export const PaneBody = styled.div`

export const PaneTitle = styled.div`
margin-bottom: 10px;
display: flex;
gap: 5px;
align-items: center;
`

export const PaneBodySectionTitle = styled.span`
Expand Down
13 changes: 9 additions & 4 deletions src/neo4j-arc/common/components/WarningMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,22 @@ import { WarningIcon } from '../icons/Icons'
import React from 'react'
import styled from 'styled-components'

export const StyledWarningMessage = styled.span`
export const StyledWarningMessageWrapper = styled.div`
color: orange;
svg {
display: inline;
}
`

type WarningMessageProps = {
text: string
}
export const WarningMessage = ({ text }: WarningMessageProps): JSX.Element => {
return (
<StyledWarningMessage>
<StyledWarningMessageWrapper>
<WarningIcon />
&nbsp;{text}&nbsp;
</StyledWarningMessage>
<span>&nbsp;{text}&nbsp;</span>
</StyledWarningMessageWrapper>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function DefaultDetailsPane({
<>
<PaneHeader>
<PaneTitle>
{upperFirst(vizItem.type)} Properties{' '}
<span>{`${upperFirst(vizItem.type)} Properties`}</span>
<ClipboardCopier
textToCopy={allItemProperties
.map(prop => `${prop.key}: ${prop.value}`)
Expand Down
3 changes: 3 additions & 0 deletions src/neo4j-arc/graph-visualization/GraphVisualizer/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ export const PaneBody = styled.div`

export const PaneTitle = styled.div`
margin-bottom: 10px;
display: flex;
gap: 5px;
align-items: center;
`

export const StyledResizable = styled(Resizable)`
Expand Down

0 comments on commit 27c2215

Please sign in to comment.