Skip to content

Commit

Permalink
[Code]: fix top bar button size, width and right margin (#33061)
Browse files Browse the repository at this point in the history
  • Loading branch information
zfy0701 authored Mar 13, 2019
1 parent 2da9cd3 commit 1e703f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 6 additions & 3 deletions x-pack/plugins/code/public/components/main/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ const ButtonsContainer = styled.div`
& > *:first-child {
margin-right: ${theme.euiSizeS};
}
& .euiButton {
min-width: ${theme.euiSizeS};
}
`;

const EditorBlameContainer = styled.div`
Expand Down Expand Up @@ -182,15 +185,15 @@ class CodeContent extends React.PureComponent<Props> {
return (
<ButtonsContainer>
<EuiButtonGroup
buttonSize="m"
buttonSize="s"
color="primary"
options={this.buttonOptions}
type="single"
idSelected={buttonId}
onChange={this.switchButton}
/>
<EuiButtonGroup
buttonSize="m"
buttonSize="s"
color="primary"
options={this.rawButtonOptions}
type="single"
Expand All @@ -203,7 +206,7 @@ class CodeContent extends React.PureComponent<Props> {
return (
<ButtonsContainer>
<EuiButtonGroup
buttonSize="m"
buttonSize="s"
color="primary"
options={[
{
Expand Down
4 changes: 1 addition & 3 deletions x-pack/plugins/code/public/components/main/top_bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export class TopBar extends React.Component<Props, { value: string }> {
<Breadcrumb routeParams={this.props.routeParams} />
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem grow={false} style={{ marginRight: '-.5rem' }}>
{this.props.buttons}
</EuiFlexItem>
<EuiFlexItem grow={false}>{this.props.buttons}</EuiFlexItem>
</EuiFlexGroup>
</div>
);
Expand Down

0 comments on commit 1e703f0

Please sign in to comment.