@qiwi/pijma-desktop 1.139.3 → 1.140.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # @qiwi/pijma-desktop [1.140.0](https://github.com/qiwi/pijma/compare/@qiwi/pijma-desktop@1.139.3...@qiwi/pijma-desktop@1.140.0) (2021-12-23)
2
+
3
+
4
+ ### Features
5
+
6
+ * oops improvements ([#465](https://github.com/qiwi/pijma/issues/465)) ([fa0bd17](https://github.com/qiwi/pijma/commit/fa0bd17ab124d90ae31a2a1812465bde98188a7c))
7
+
1
8
  ## [1.139.3](https://github.com/qiwi/pijma/compare/@qiwi/pijma-desktop@1.139.2...@qiwi/pijma-desktop@1.139.3) (2021-12-21)
2
9
 
3
10
  ## [1.139.2](https://github.com/qiwi/pijma/compare/@qiwi/pijma-desktop@1.139.1...@qiwi/pijma-desktop@1.139.2) (2021-12-15)
@@ -1,7 +1,7 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  export interface OopsProps {
3
- logo: ReactNode;
4
- error: string;
3
+ logo?: ReactNode;
4
+ error: ReactNode;
5
5
  title: string;
6
6
  content: ReactNode;
7
7
  footer?: ReactNode;
@@ -4,24 +4,23 @@ import { Title, Paragraph } from "../typography/index.js";
4
4
  export const Oops = ({ logo, error, title, content, footer }) => /* @__PURE__ */ React.createElement(Card, {
5
5
  minWidth: 295,
6
6
  width: "100%",
7
- pt: 22,
7
+ py: 22,
8
8
  minHeight: "100%",
9
9
  bg: "#fff"
10
10
  }, /* @__PURE__ */ React.createElement(Flex, {
11
11
  mx: "auto",
12
12
  width: 235,
13
13
  direction: "column"
14
- }, /* @__PURE__ */ React.createElement(FlexItem, {
15
- width: 60,
16
- height: 12,
14
+ }, logo ? /* @__PURE__ */ React.createElement(FlexItem, {
15
+ shrink: 0,
17
16
  children: logo
18
- }), /* @__PURE__ */ React.createElement(FlexItem, {
19
- mt: footer ? 9 : 30
17
+ }) : null, /* @__PURE__ */ React.createElement(FlexItem, {
18
+ my: 30
20
19
  }, /* @__PURE__ */ React.createElement(Flex, {
21
20
  align: "center"
22
21
  }, /* @__PURE__ */ React.createElement(FlexItem, {
23
22
  shrink: 0
24
- }, /* @__PURE__ */ React.createElement(Typo, {
23
+ }, typeof error === "string" ? /* @__PURE__ */ React.createElement(Typo, {
25
24
  as: "p",
26
25
  css: {
27
26
  overflow: "unset",
@@ -31,7 +30,7 @@ export const Oops = ({ logo, error, title, content, footer }) => /* @__PURE__ */
31
30
  textShadow: "0 12px 36px rgba(0, 0, 0, 0.1)"
32
31
  },
33
32
  children: error
34
- })), /* @__PURE__ */ React.createElement(FlexItem, {
33
+ }) : error), /* @__PURE__ */ React.createElement(FlexItem, {
35
34
  ml: 11,
36
35
  width: 1
37
36
  }, /* @__PURE__ */ React.createElement(Flex, {
@@ -42,10 +41,12 @@ export const Oops = ({ logo, error, title, content, footer }) => /* @__PURE__ */
42
41
  })), /* @__PURE__ */ React.createElement(FlexItem, {
43
42
  mt: 6
44
43
  }, typeof content === "string" ? /* @__PURE__ */ React.createElement(Paragraph, {
45
- bold: true,
46
- size: "m",
47
44
  children: content
48
45
  }) : content))))), footer ? /* @__PURE__ */ React.createElement(FlexItem, {
49
46
  shrink: 0,
50
- children: footer
47
+ children: typeof footer === "string" ? /* @__PURE__ */ React.createElement(Paragraph, {
48
+ align: "center",
49
+ color: "support",
50
+ children: footer
51
+ }) : footer
51
52
  }) : null));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qiwi/pijma-desktop",
3
- "version": "1.139.3",
3
+ "version": "1.140.0",
4
4
  "main": "./lib/es6/index.js",
5
5
  "types": "./lib/es6/index.d.ts",
6
6
  "license": "MIT",