x-star-design 0.0.24 → 0.0.25
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.
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
type SubmissionStatusProps = {
|
|
3
3
|
status: string;
|
|
4
4
|
className?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
style?: React.CSSProperties;
|
|
5
7
|
};
|
|
6
|
-
declare const SubmissionStatus: ({ className, status }: SubmissionStatusProps) => React.JSX.Element;
|
|
8
|
+
declare const SubmissionStatus: ({ className, status, onClick, style, }: SubmissionStatusProps) => React.JSX.Element;
|
|
7
9
|
export default SubmissionStatus;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
1
2
|
import classNames from 'classnames';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
var scopeColor = new Map([['Accepted', '#00ad07'], ['Wrong Answer', '#f44336'], ['Time Limit Exceeded', '#56A2F5'], ['Compile Error', '#F5B13D'], ['Runtime Error', '#F56ED3'], ['Memory Limit Exceeded', '#9256F5'], ['Running', 'orange'], ['Testing', '#818181'], ['Abnormal', '#9256F5'], ['Pending', 'orange']]);
|
|
4
5
|
var SubmissionStatus = function SubmissionStatus(_ref) {
|
|
5
6
|
var className = _ref.className,
|
|
6
|
-
status = _ref.status
|
|
7
|
+
status = _ref.status,
|
|
8
|
+
onClick = _ref.onClick,
|
|
9
|
+
style = _ref.style;
|
|
7
10
|
return /*#__PURE__*/React.createElement("div", {
|
|
8
11
|
className: classNames(className),
|
|
9
|
-
style: {
|
|
12
|
+
style: _objectSpread({
|
|
10
13
|
fontWeight: 'bold',
|
|
11
14
|
color: scopeColor.get(status)
|
|
12
|
-
}
|
|
15
|
+
}, style),
|
|
16
|
+
onClick: onClick
|
|
13
17
|
}, status);
|
|
14
18
|
};
|
|
15
19
|
export default SubmissionStatus;
|