x-star-design 0.0.22 → 0.0.23

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",
@@ -1,5 +1,3 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import { useCookieState } from 'ahooks';
3
1
  import React, { useContext, useRef } from 'react';
4
2
  import en_US from "./en_US";
5
3
  import zh_CN from "./zh_CN";
@@ -14,10 +12,7 @@ export var LocaleProvider = function LocaleProvider(_ref) {
14
12
  };
15
13
  export var useLocale = function useLocale(slice) {
16
14
  var _zh_CN$en_US$locale;
17
- var _useCookieState = useCookieState('lang'),
18
- _useCookieState2 = _slicedToArray(_useCookieState, 1),
19
- cookieLang = _useCookieState2[0];
20
- var locale = useContext(LocaleContext) || cookieLang === 'zh' ? 'zh_CN' : 'en_US';
15
+ var locale = useContext(LocaleContext);
21
16
  var message = ((_zh_CN$en_US$locale = {
22
17
  zh_CN: zh_CN,
23
18
  en_US: en_US
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.23",
4
4
  "description": "A react component library developed by turingstar",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",