@antv/dumi-theme-antv 0.4.0 → 0.4.2
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,
|
|
@@ -79,7 +80,8 @@ export var Detail = function Detail(_ref) {
|
|
|
79
80
|
style = _ref2.style,
|
|
80
81
|
text = _ref2.text,
|
|
81
82
|
link = _ref2.link,
|
|
82
|
-
shape = _ref2.shape
|
|
83
|
+
shape = _ref2.shape,
|
|
84
|
+
icon = _ref2.icon;
|
|
83
85
|
return /*#__PURE__*/React.createElement("a", {
|
|
84
86
|
key: ic(text),
|
|
85
87
|
className: cx(styles.buttonLink, styles[type || ''], type === 'primary' ? 'primary-button' : 'common-button'),
|
|
@@ -87,8 +89,11 @@ export var Detail = function Detail(_ref) {
|
|
|
87
89
|
borderRadius: shape === 'round' ? '1000px' : '12px'
|
|
88
90
|
}, style),
|
|
89
91
|
href: link[lang] ? link[lang] : link
|
|
90
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
className: styles.icon
|
|
92
|
+
}, icon !== null && /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
className: styles.icon,
|
|
94
|
+
style: icon ? {
|
|
95
|
+
backgroundImage: "url(".concat(icon, ")")
|
|
96
|
+
} : {}
|
|
92
97
|
}), /*#__PURE__*/React.createElement("span", {
|
|
93
98
|
className: styles.button
|
|
94
99
|
}, ic(text)));
|
|
@@ -113,10 +118,10 @@ export var Detail = function Detail(_ref) {
|
|
|
113
118
|
className: cx(styles.teaserimg, 'teaser-img')
|
|
114
119
|
}, /*#__PURE__*/React.createElement("img", {
|
|
115
120
|
width: "100%",
|
|
116
|
-
style: {
|
|
121
|
+
style: _objectSpread({
|
|
117
122
|
marginLeft: '100px',
|
|
118
123
|
marginTop: '40px'
|
|
119
|
-
},
|
|
124
|
+
}, imageStyle),
|
|
120
125
|
src: image
|
|
121
126
|
}))), /*#__PURE__*/React.createElement("img", {
|
|
122
127
|
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;
|