Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Fix some warnings in console #155

Merged
merged 4 commits into from
Oct 4, 2019
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
14 changes: 9 additions & 5 deletions src/components/DetailSidebar/DetailSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ import Repository from '../Repository/Repository';

import { DetailContext } from '../../pages/Version';

import { TitleListItem, TitleListItemText } from './styles';
import { TitleListItem, TitleListItemText, PackageDescription, PackageVersion } from './styles';

const renderLatestDescription = (description, version, isLatest: boolean = true): JSX.Element => {
return (
<span>
<div>{description}</div>
{version ? <small>{`${isLatest ? 'Latest v' : 'v'}${version}`}</small> : null}
</span>
<>
<PackageDescription>{description}</PackageDescription>
juanpicado marked this conversation as resolved.
Show resolved Hide resolved
{version ? (
<PackageVersion>
<small>{`${isLatest ? 'Latest v' : 'v'}${version}`}</small>
</PackageVersion>
) : null}
</>
);
};

Expand Down
15 changes: 8 additions & 7 deletions src/components/DetailSidebar/styles.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import styled from 'react-emotion';
import Avatar from '@material-ui/core/Avatar';
import ListItem from '@material-ui/core/ListItem';
import ListItemText from '@material-ui/core/ListItemText';

import colors from '../../utils/styles/colors';

export const TitleListItem = styled(ListItem)({
'&&': {
paddingLeft: 0,
Expand All @@ -21,10 +18,14 @@ export const TitleListItemText = styled(ListItemText)({
},
});

export const TitleAvatar = styled(Avatar)({
export const PackageDescription = styled('span')({
'&&': {
juanpicado marked this conversation as resolved.
Show resolved Hide resolved
display: 'block',
},
});

export const PackageVersion = styled('span')({
'&&': {
color: colors.greySuperLight,
backgroundColor: colors.primary,
textTransform: 'capitalize',
display: 'block',
},
});
2 changes: 1 addition & 1 deletion src/components/Footer/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const Flags = styled('span')`
border-color: ${colors.greyAthens} transparent transparent transparent;
transform: rotate(90deg);
}
${ToolTip}:hover & {
${/* sc-selector */ ToolTip}:hover & {
visibility: visible;
}
}
Expand Down