x-star-design 0.0.22 → 0.0.24

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.
@@ -58,6 +58,7 @@ var CodeDetailModal = function CodeDetailModal(_ref) {
58
58
  align: 'center',
59
59
  title: t('Score'),
60
60
  dataIndex: 'score',
61
+ width: 60,
61
62
  render: function render(score) {
62
63
  return score ? /*#__PURE__*/React.createElement("span", null, score) : '-';
63
64
  }
@@ -75,15 +76,19 @@ var CodeDetailModal = function CodeDetailModal(_ref) {
75
76
  align: 'center',
76
77
  title: t('File'),
77
78
  dataIndex: 'link',
79
+ width: 60,
78
80
  render: function render(v) {
79
- return /*#__PURE__*/React.createElement("a", {
80
- href: v
81
- }, /*#__PURE__*/React.createElement(DownloadOutlined, null));
81
+ return /*#__PURE__*/React.createElement(Button, {
82
+ href: v,
83
+ type: "link",
84
+ icon: /*#__PURE__*/React.createElement(DownloadOutlined, null)
85
+ });
82
86
  }
83
87
  } : {
84
88
  key: 'code',
85
89
  align: 'center',
86
90
  title: t('Code'),
91
+ width: 60,
87
92
  render: function render() {
88
93
  return /*#__PURE__*/React.createElement("a", {
89
94
  rel: "noreferrer",
@@ -17,7 +17,7 @@ export var useLocale = function useLocale(slice) {
17
17
  var _useCookieState = useCookieState('lang'),
18
18
  _useCookieState2 = _slicedToArray(_useCookieState, 1),
19
19
  cookieLang = _useCookieState2[0];
20
- var locale = useContext(LocaleContext) || cookieLang === 'zh' ? 'zh_CN' : 'en_US';
20
+ var locale = useContext(LocaleContext) || (cookieLang === 'zh' ? 'zh_CN' : 'en_US');
21
21
  var message = ((_zh_CN$en_US$locale = {
22
22
  zh_CN: zh_CN,
23
23
  en_US: en_US
@@ -3,6 +3,7 @@ type TitleWithIconProps = {
3
3
  title: string;
4
4
  className?: string;
5
5
  description?: string;
6
+ id?: string;
6
7
  };
7
- declare const TitleWithIcon: ({ className, title, description, }: TitleWithIconProps) => React.JSX.Element;
8
+ declare const TitleWithIcon: ({ className, title, description, id, }: TitleWithIconProps) => React.JSX.Element;
8
9
  export default TitleWithIcon;
@@ -5,9 +5,11 @@ import { prefix } from "../utils/global";
5
5
  var TitleWithIcon = function TitleWithIcon(_ref) {
6
6
  var className = _ref.className,
7
7
  title = _ref.title,
8
- description = _ref.description;
8
+ description = _ref.description,
9
+ id = _ref.id;
9
10
  return /*#__PURE__*/React.createElement("div", {
10
- className: classNames(className, "".concat(prefix, "titleSection"))
11
+ className: classNames(className, "".concat(prefix, "titleSection")),
12
+ id: id
11
13
  }, /*#__PURE__*/React.createElement("img", {
12
14
  src: rightSvg,
13
15
  alt: ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-star-design",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "A react component library developed by turingstar",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",