mirror of
https://github.com/SomboChea/ui
synced 2024-11-24 15:04:27 +07:00
fix: some warnings in console (#155)
* fix: remove react emotion selector warning * fix: validate DOM nesting
This commit is contained in:
parent
7bd9eb7a07
commit
583ddd555a
@ -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>
|
||||
{version ? (
|
||||
<PackageVersion>
|
||||
<small>{`${isLatest ? 'Latest v' : 'v'}${version}`}</small>
|
||||
</PackageVersion>
|
||||
) : null}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
@ -21,10 +18,14 @@ export const TitleListItemText = styled(ListItemText)({
|
||||
},
|
||||
});
|
||||
|
||||
export const TitleAvatar = styled(Avatar)({
|
||||
export const PackageDescription = styled('span')({
|
||||
'&&': {
|
||||
color: colors.greySuperLight,
|
||||
backgroundColor: colors.primary,
|
||||
textTransform: 'capitalize',
|
||||
display: 'block',
|
||||
},
|
||||
});
|
||||
|
||||
export const PackageVersion = styled('span')({
|
||||
'&&': {
|
||||
display: 'block',
|
||||
},
|
||||
});
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user