@antv/dumi-theme-antv 0.4.0 → 0.4.1
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.
|
@@ -7,6 +7,7 @@ type DetailButtonProps = {
|
|
|
7
7
|
style?: React.CSSProperties;
|
|
8
8
|
type?: string;
|
|
9
9
|
shape?: 'round' | 'square';
|
|
10
|
+
icon?: string;
|
|
10
11
|
};
|
|
11
12
|
type DetailProps = {
|
|
12
13
|
className?: string;
|
|
@@ -15,6 +16,7 @@ type DetailProps = {
|
|
|
15
16
|
engine?: IC;
|
|
16
17
|
description: IC;
|
|
17
18
|
image?: string;
|
|
19
|
+
imageStyle?: React.CSSProperties;
|
|
18
20
|
buttons?: DetailButtonProps[];
|
|
19
21
|
githubUrl: string;
|
|
20
22
|
showGithubStars?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["className", "style", "title", "engine", "description", "image", "githubUrl", "showGithubStars", "buttons", "news"];
|
|
2
|
+
var _excluded = ["className", "style", "title", "engine", "description", "image", "imageStyle", "githubUrl", "showGithubStars", "buttons", "news"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -35,6 +35,7 @@ export var Detail = function Detail(_ref) {
|
|
|
35
35
|
engine = _ref.engine,
|
|
36
36
|
description = _ref.description,
|
|
37
37
|
image = _ref.image,
|
|
38
|
+
imageStyle = _ref.imageStyle,
|
|
38
39
|
githubUrl = _ref.githubUrl,
|
|
39
40
|
_ref$showGithubStars = _ref.showGithubStars,
|
|
40
41
|
showGithubStars = _ref$showGithubStars === void 0 ? true : _ref$showGithubStars,
|
|
@@ -47,6 +48,7 @@ export var Detail = function Detail(_ref) {
|
|
|
47
48
|
remoteNews = _useState2[0],
|
|
48
49
|
setRemoteNews = _useState2[1];
|
|
49
50
|
var lang = useLocale().id;
|
|
51
|
+
console.log(buttons, 'buttons');
|
|
50
52
|
useEffect(function () {
|
|
51
53
|
fetch(AssetsNewsURL).then(function (res) {
|
|
52
54
|
return res.json();
|
|
@@ -79,7 +81,8 @@ export var Detail = function Detail(_ref) {
|
|
|
79
81
|
style = _ref2.style,
|
|
80
82
|
text = _ref2.text,
|
|
81
83
|
link = _ref2.link,
|
|
82
|
-
shape = _ref2.shape
|
|
84
|
+
shape = _ref2.shape,
|
|
85
|
+
icon = _ref2.icon;
|
|
83
86
|
return /*#__PURE__*/React.createElement("a", {
|
|
84
87
|
key: ic(text),
|
|
85
88
|
className: cx(styles.buttonLink, styles[type || ''], type === 'primary' ? 'primary-button' : 'common-button'),
|
|
@@ -88,7 +91,10 @@ export var Detail = function Detail(_ref) {
|
|
|
88
91
|
}, style),
|
|
89
92
|
href: link[lang] ? link[lang] : link
|
|
90
93
|
}, /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
className: styles.icon
|
|
94
|
+
className: styles.icon,
|
|
95
|
+
style: icon ? {
|
|
96
|
+
backgroundImage: "url(".concat(icon, ")")
|
|
97
|
+
} : {}
|
|
92
98
|
}), /*#__PURE__*/React.createElement("span", {
|
|
93
99
|
className: styles.button
|
|
94
100
|
}, ic(text)));
|
|
@@ -113,10 +119,10 @@ export var Detail = function Detail(_ref) {
|
|
|
113
119
|
className: cx(styles.teaserimg, 'teaser-img')
|
|
114
120
|
}, /*#__PURE__*/React.createElement("img", {
|
|
115
121
|
width: "100%",
|
|
116
|
-
style: {
|
|
122
|
+
style: _objectSpread({
|
|
117
123
|
marginLeft: '100px',
|
|
118
124
|
marginTop: '40px'
|
|
119
|
-
},
|
|
125
|
+
}, imageStyle),
|
|
120
126
|
src: image
|
|
121
127
|
}))), /*#__PURE__*/React.createElement("img", {
|
|
122
128
|
className: styles.backLeftBottom,
|
|
@@ -133,7 +133,6 @@
|
|
|
133
133
|
.github-btn {
|
|
134
134
|
display: flex;
|
|
135
135
|
height: 54px;
|
|
136
|
-
padding: 0 16px;
|
|
137
136
|
cursor: pointer;
|
|
138
137
|
box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.05);
|
|
139
138
|
background-color: #FFFFFF;
|
|
@@ -157,6 +156,7 @@
|
|
|
157
156
|
}
|
|
158
157
|
|
|
159
158
|
.gh-btn {
|
|
159
|
+
padding: 16px;
|
|
160
160
|
.gh-ico {
|
|
161
161
|
display: block;
|
|
162
162
|
width: 20px;
|
|
@@ -175,9 +175,12 @@
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
.gh-count {
|
|
178
|
+
height: 54px;
|
|
179
|
+
line-height: 22px;
|
|
180
|
+
padding: 16px 16px 16px 0;
|
|
178
181
|
position: relative;
|
|
179
182
|
font-size: 18px;
|
|
180
|
-
margin-left: 8px;
|
|
183
|
+
margin-left: -8px;
|
|
181
184
|
color: #1D2129;
|
|
182
185
|
letter-spacing: 0;
|
|
183
186
|
font-family: AlibabaSans102-Medium;
|