Skip to content

Commit 2cbaf8d

Browse files
authored
Merge pull request #794 from fcollonval/fix-issue-793
Style issues with SVG icons
2 parents 7b7f0e5 + 69579d9 commit 2cbaf8d

File tree

5 files changed

+196
-170
lines changed

5 files changed

+196
-170
lines changed

src/components/FileItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export class FileItem extends React.PureComponent<IFileItemProps> {
160160
const status = this._getFileChangedLabel(status_code as any);
161161

162162
return (
163-
<li
163+
<div
164164
className={this._getFileClass()}
165165
onClick={
166166
this.props.selectFile &&
@@ -191,7 +191,7 @@ export class FileItem extends React.PureComponent<IFileItemProps> {
191191
<span className={this._getFileChangedLabelClass(this.props.file.y)}>
192192
{this.props.file.y === '?' ? 'U' : status_code}
193193
</span>
194-
</li>
194+
</div>
195195
);
196196
}
197197
}

src/components/FilePath.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { DocumentRegistry } from '@jupyterlab/docregistry';
22
import { fileIcon } from '@jupyterlab/ui-components';
33
import * as React from 'react';
4-
import { fileLabelStyle, folderLabelStyle } from '../style/FilePathStyle';
4+
import {
5+
fileIconStyle,
6+
fileLabelStyle,
7+
folderLabelStyle
8+
} from '../style/FilePathStyle';
59
import { extractFilename } from '../utils';
610

711
/**
@@ -30,7 +34,11 @@ export const FilePath: React.FunctionComponent<IFilePathProps> = (
3034

3135
return (
3236
<React.Fragment>
33-
<icon.react elementPosition="center" tag="span" />
37+
<icon.react
38+
className={fileIconStyle}
39+
elementPosition="center"
40+
tag="span"
41+
/>
3442
<span className={fileLabelStyle}>
3543
{filename}
3644
<span className={folderLabelStyle}>{folder}</span>

src/components/GitStage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ export const GitStage: React.FunctionComponent<IGitStageProps> = (
8585
Math.min(props.height - HEADER_HEIGHT, nFiles * ITEM_HEIGHT),
8686
ITEM_HEIGHT
8787
)}
88-
innerElementType="ul"
8988
itemCount={nFiles}
9089
itemData={props.files}
9190
itemKey={(index, data) => data[index].to}

src/style/SinglePastCommitInfo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const commitDetailHeaderClass = style({
3838
export const commitDetailFileClass = style({
3939
display: 'flex',
4040
flexDirection: 'row',
41+
alignItems: 'center',
4142
color: 'var(--jp-ui-font-color1)',
4243
height: 'var(--jp-private-running-item-height)',
4344
lineHeight: 'var(--jp-private-running-item-height)',

0 commit comments

Comments
 (0)