@pdfme/ui 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfme/ui",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "author": "hand-dot",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -21,13 +21,7 @@ const Pager = ({ pageCursor, pageNum, setPageCursor }: Props) => {
21
21
  const i18n = useContext(I18nContext);
22
22
 
23
23
  return (
24
- <div
25
- style={{
26
- display: 'flex',
27
- alignItems: 'center',
28
- justifyContent: 'center',
29
- }}
30
- >
24
+ <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
31
25
  <button
32
26
  style={{
33
27
  paddingLeft: '0.5rem',
@@ -39,7 +33,7 @@ const Pager = ({ pageCursor, pageNum, setPageCursor }: Props) => {
39
33
  >
40
34
  <img src={left} alt={i18n('goToPrevious')} style={{ width: 20 }} />
41
35
  </button>
42
- <strong style={{ color: 'white', fontSize: '0.9rem' }}>
36
+ <strong style={{ color: 'white', fontSize: '0.9rem', minWidth: 45, textAlign: 'center' }}>
43
37
  {pageCursor + 1}/{pageNum}
44
38
  </strong>
45
39
  <button
@@ -33,20 +33,22 @@ const Pager = ({ zoomLevel, setZoomLevel }: Props) => {
33
33
  ...btnStyle,
34
34
  cursor: minZoom >= nextZoomOut ? 'not-allowed' : 'pointer',
35
35
  }}
36
- onClick={() => setZoomLevel(nextZoomOut)}
37
36
  disabled={minZoom >= nextZoomOut}
37
+ onClick={() => setZoomLevel(nextZoomOut)}
38
38
  >
39
39
  <img src={remove} alt={i18n('zoomOut')} style={{ width: 20 }} />
40
40
  </button>
41
- <strong style={{ color: 'white', fontSize: '0.9rem' }}>{Math.round(zoomLevel * 100)}%</strong>
41
+ <strong style={{ color: 'white', fontSize: '0.9rem', minWidth: 45, textAlign: 'center' }}>
42
+ {Math.round(zoomLevel * 100)}%
43
+ </strong>
42
44
  <button
43
45
  style={{
44
46
  paddingRight: '0.5rem',
45
47
  ...btnStyle,
46
48
  cursor: maxZoom < nextZoomIn ? 'not-allowed' : 'pointer',
47
49
  }}
48
- onClick={() => setZoomLevel(nextZoomIn)}
49
50
  disabled={maxZoom < nextZoomIn}
51
+ onClick={() => setZoomLevel(nextZoomIn)}
50
52
  >
51
53
  <img src={add} alt={i18n('zoomIn')} style={{ width: 20 }} />
52
54
  </button>
@@ -12,7 +12,7 @@ type Props = {
12
12
  setZoomLevel: (zoom: number) => void;
13
13
  };
14
14
 
15
- const barWidth = 220;
15
+ const barWidth = 250;
16
16
 
17
17
  const CtlBar = (props: Props) => {
18
18
  const { size, pageCursor, pageNum, setPageCursor, zoomLevel, setZoomLevel } = props;
@@ -52,7 +52,7 @@ const Sidebar = (props: SidebarProps) => {
52
52
  <button
53
53
  style={{
54
54
  position: 'absolute',
55
- top: '1rem',
55
+ top: '1.75rem',
56
56
  right: '0.5rem',
57
57
  zIndex: 100,
58
58
  border: 'none',