Skip to content

Commit

Permalink
fix(code): use monospace font for commit hash (#33307)
Browse files Browse the repository at this point in the history
  • Loading branch information
WangQianliang authored Mar 20, 2019
1 parent 14c282a commit b3a2927
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
17 changes: 4 additions & 13 deletions x-pack/plugins/code/public/components/main/commit_history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ const Header = styled.div`
justify-content: space-between;
`;

const CommitId = styled.div`
height: calc(20rem / 14);
margin: auto 0;
text-align: center;
flex-shrink: 0;
`;

const CommitContainer = styled.div``;

const Commit = (props: { commit: CommitInfo; date: string; repoUri: string }) => {
const { date, commit } = props;
const { message, committer, id } = commit;
Expand All @@ -52,7 +43,7 @@ const Commit = (props: { commit: CommitInfo; date: string; repoUri: string }) =>
.join('');
return (
<EuiPanel className="code-timeline__commit--root">
<CommitContainer>
<div>
<EuiText size="s">
<p>{message}</p>
</EuiText>
Expand All @@ -61,10 +52,10 @@ const Commit = (props: { commit: CommitInfo; date: string; repoUri: string }) =>
{committer} · {date}
</EuiTextColor>
</EuiText>
</CommitContainer>
<CommitId>
</div>
<div className="code-commit-id">
<CommitLink repoUri={props.repoUri} commit={commitId} />
</CommitId>
</div>
</EuiPanel>
);
};
Expand Down
8 changes: 8 additions & 0 deletions x-pack/plugins/code/public/components/main/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,11 @@
.code-no-min-width {
min-width: unset !important;
}

.code-commit-id {
@include euiCodeFont;
height: calc(20rem / 14);
margin: auto 0;
text-align: center;
flex-shrink: 0;
}

0 comments on commit b3a2927

Please sign in to comment.