Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Feb 19, 2024
1 parent 1cd368d commit 1698530
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,13 @@ const IstanbulReport: FC<IstanbulReportProps> = ({
<div className="clearfix">
{dims.map((dim) => (
<div className="fl pad1y space-right2">
<span className="strong">
<span className="strong" style={{ marginRight: '5px' }}>
{/*// @ts-ignore*/}
{summaryTreeItem.summary[dim].pct}%
</span>
<span className="quiet">{capitalized(dim)}</span>
<span className="quiet" style={{ marginRight: '5px' }}>
{capitalized(dim)}
</span>
<span className="fraction">
{/*// @ts-ignore*/}
{summaryTreeItem.summary[dim].covered}/{/*// @ts-ignore*/}
Expand Down
5 changes: 4 additions & 1 deletion packages/canyon-report/src/Report/components/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ const Code: FC<{
})}
/>
<LineNew news={fileCodeChange} />
<div dangerouslySetInnerHTML={{ __html: html }} />
<div
style={{ flexGrow: 1, overflow: 'auto' }}
dangerouslySetInnerHTML={{ __html: html }}
/>
</div>
);
};
Expand Down
4 changes: 2 additions & 2 deletions packages/canyon-report/src/Report/components/line/new.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const LineNew = ({news}) => {
const LineNew = ({ news }) => {
// const news = [1, 2, 3, 7, 8, 9, 10, 14, 15];
return (
<div style={{ width: '20px', textAlign: 'center' }}>
{[...Array(200)].map((line, index) => {
return (
<div style={{ height: '14px', color: 'green' }}>
<div style={{ height: '14px', color: 'green', width: '20px' }}>
{news.includes(index) ? '+' : ''}
</div>
);
Expand Down

0 comments on commit 1698530

Please sign in to comment.