Skip to content

Commit

Permalink
fix(Paging): fix hint height (#3295)
Browse files Browse the repository at this point in the history
  • Loading branch information
SchwJ committed Oct 30, 2023
1 parent 06464f8 commit 67363ca
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 39 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions packages/react-ui/components/Paging/Paging.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,12 @@ export const styles = memoizeStyle({
`;
},

pageLinkHintPlaceHolder(t: Theme) {
return css`
height: ${t.pagingPageLinkHintLineHeight};
line-height: ${t.pagingPageLinkHintLineHeight};
`;
},

pageLinkHint(t: Theme) {
return css`
display: inline-block;
margin: ${t.pagingPageLinkHintMargin};
font-size: ${t.pagingPageLinkHintFontSize};
height: ${t.pagingPageLinkHintLineHeight};
line-height: ${t.pagingPageLinkHintLineHeight};
color: ${t.pagingPageLinkHintColor};
`;
Expand Down
10 changes: 5 additions & 5 deletions packages/react-ui/components/Paging/Paging.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,17 @@ export class Paging extends React.PureComponent<PagingProps, PagingState> {
const canGoBackward = this.canGoBackward();
const canGoForward = this.canGoForward();

let hint = null;
if (keyboardControl && (canGoBackward || canGoForward)) {
return (
<span className={styles.pageLinkHint(this.theme)}>
hint = (
<>
<span className={canGoBackward ? '' : styles.transparent()}>{'←'}</span>
<span>{NavigationHelper.getKeyName()}</span>
<span className={canGoForward ? '' : styles.transparent()}>{'→'}</span>
</span>
</>
);
}

return <div className={styles.pageLinkHintPlaceHolder(this.theme)} />;
return <div className={styles.pageLinkHint(this.theme)}>{hint}</div>;
};

private handleMouseDown = () => {
Expand Down

0 comments on commit 67363ca

Please sign in to comment.