@pareto-engineering/design-system 5.0.1 → 5.0.4

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.
@@ -67,12 +67,19 @@ const Preview = _ref => {
67
67
  }, type), /*#__PURE__*/React.createElement("span", {
68
68
  title: file.name,
69
69
  className: "name"
70
- }, file.name), isFileBroken ? /*#__PURE__*/React.createElement(_a.Tooltip, {
70
+ }, file.name), isFileBroken ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_a.Tooltip, {
71
71
  description: "bulk-updates-text",
72
72
  content: /*#__PURE__*/React.createElement("p", null, "This file doesn't have a link or the link is invalid.")
73
73
  }, /*#__PURE__*/React.createElement("span", {
74
74
  className: "icon x-ui-icons c-x"
75
- }, "h")) : /*#__PURE__*/React.createElement(_b.Button, {
75
+ }, "h")), writeOnly && /*#__PURE__*/React.createElement(_b.Button, {
76
+ color: "ui-icons",
77
+ isCompact: true,
78
+ isSimple: true,
79
+ onClick: () => handleDelete()
80
+ }, /*#__PURE__*/React.createElement("span", {
81
+ className: "icon"
82
+ }, canDelete ? 'Y' : '9'))) : /*#__PURE__*/React.createElement(_b.Button, {
76
83
  color: "ui-icons",
77
84
  isCompact: true,
78
85
  isSimple: true,
@@ -57,12 +57,19 @@ const Preview = ({
57
57
  }, type), /*#__PURE__*/React.createElement("span", {
58
58
  title: file.name,
59
59
  className: "name"
60
- }, file.name), isFileBroken ? /*#__PURE__*/React.createElement(Tooltip, {
60
+ }, file.name), isFileBroken ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
61
61
  description: "bulk-updates-text",
62
62
  content: /*#__PURE__*/React.createElement("p", null, "This file doesn't have a link or the link is invalid.")
63
63
  }, /*#__PURE__*/React.createElement("span", {
64
64
  className: "icon x-ui-icons c-x"
65
- }, "h")) : /*#__PURE__*/React.createElement(Button, {
65
+ }, "h")), writeOnly && /*#__PURE__*/React.createElement(Button, {
66
+ color: "ui-icons",
67
+ isCompact: true,
68
+ isSimple: true,
69
+ onClick: () => handleDelete()
70
+ }, /*#__PURE__*/React.createElement("span", {
71
+ className: "icon"
72
+ }, canDelete ? 'Y' : '9'))) : /*#__PURE__*/React.createElement(Button, {
66
73
  color: "ui-icons",
67
74
  isCompact: true,
68
75
  isSimple: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pareto-engineering/design-system",
3
- "version": "5.0.1",
3
+ "version": "5.0.4",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.js",
@@ -87,5 +87,5 @@
87
87
  "remark-math": "^6.0.0"
88
88
  },
89
89
  "browserslist": "> 2%",
90
- "gitHead": "874a3dc9198810523c6fe0edbaf72f43ddd6612d"
90
+ "gitHead": "a9fbff3dbe659640a9ce467be3ef88f3b4f0e4b0"
91
91
  }
@@ -91,18 +91,32 @@ const Preview = ({
91
91
  <span title={file.name} className="name">{file.name}</span>
92
92
  {isFileBroken
93
93
  ? (
94
- <Tooltip
95
- description="bulk-updates-text"
96
- content={(
97
- <p>
98
- This file doesn&apos;t have a link or the link is invalid.
99
- </p>
100
- )}
101
- >
102
- <span className="icon x-ui-icons c-x">
103
- h
104
- </span>
105
- </Tooltip>
94
+ <>
95
+ <Tooltip
96
+ description="bulk-updates-text"
97
+ content={(
98
+ <p>
99
+ This file doesn&apos;t have a link or the link is invalid.
100
+ </p>
101
+ )}
102
+ >
103
+ <span className="icon x-ui-icons c-x">
104
+ h
105
+ </span>
106
+ </Tooltip>
107
+ {
108
+ writeOnly && (
109
+ <Button
110
+ color="ui-icons"
111
+ isCompact
112
+ isSimple
113
+ onClick={() => handleDelete()}
114
+ >
115
+ <span className="icon">{canDelete ? 'Y' : '9'}</span>
116
+ </Button>
117
+ )
118
+ }
119
+ </>
106
120
  )
107
121
  : (
108
122
  <Button