File tree Expand file tree Collapse file tree 8 files changed +54
-24
lines changed Expand file tree Collapse file tree 8 files changed +54
-24
lines changed Original file line number Diff line number Diff line change 3
3
"version" : " 2.0.0" ,
4
4
"description" : " Sensoro Design Chart Library." ,
5
5
"license" : " MIT" ,
6
+ "repository" : {
7
+ "type" : " git" ,
8
+ "url" : " https://github.com/sensoro/sensoro-design-next.git" ,
9
+ "directory" : " @sensoro-design/charts"
10
+ },
6
11
"module" : " dist/index.js" ,
7
12
"types" : " dist/index.d.ts" ,
8
13
"files" : [
20
25
"@ant-design/plots" : " ^2.2.6" ,
21
26
"@antv/g2" : " ^5.1.18" ,
22
27
"@antv/util" : " ^3.3.5" ,
28
+ "@sensoro-design/react" : " workspace:*" ,
23
29
"@sensoro-design/styles" : " 1.27.1" ,
24
30
"antd" : " 4.23.2" ,
25
31
"clsx" : " ^2.1.1" ,
Original file line number Diff line number Diff line change 1
- import './theme' ;
2
-
3
- export { default as Line } from './Line' ;
4
- export type { LineConfig } from './Line' ;
5
-
6
- export { default as Area } from './Area' ;
7
- export type { AreaConfig } from './Area' ;
8
- export { default as Bar } from './Bar' ;
9
- export type { BarConfig } from './Bar' ;
10
- export { default as Column } from './Column' ;
11
- export type { ColumnConfig } from './Column' ;
12
- export { default as Funnel } from './Funnel' ;
13
- export type { FunnelConfig } from './Funnel' ;
14
- export { default as Gauge } from './Gauge' ;
15
- export type { GaugeConfig } from './Gauge' ;
16
- export { default as Pie } from './Pie' ;
17
- export type { PieConfig } from './Pie' ;
18
- export { default as Radar } from './Radar' ;
19
- export type { RadarConfig } from './Radar' ;
20
- export { default as Rose } from './Rose' ;
21
- export type { RoseConfig } from './Rose' ;
22
- export { default as Treemap } from './Treemap' ;
23
- export type { TreemapConfig } from './Treemap' ;
1
+ export { default as Score } from './score' ;
2
+ export type { ScoreConfig } from './score' ;
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import type { ScoreConfig } from './interface' ;
3
+
4
+ export function Score (
5
+ {
6
+ color = 'green' ,
7
+ } : ScoreConfig ,
8
+ ) {
9
+ console . log ( color ) ;
10
+ return null ;
11
+ }
Original file line number Diff line number Diff line change
1
+ import { Score } from './Score' ;
2
+
3
+ export type { ScoreConfig } from './interface' ;
4
+ export default Score ;
Original file line number Diff line number Diff line change
1
+ import type React from 'react' ;
2
+
3
+ export interface ScoreConfig {
4
+ /** 额外类名 */
5
+ className ?: string ;
6
+ /** 额外样式 */
7
+ style ?: React . CSSProperties ;
8
+ /** 图表大小 */
9
+ size ?: string | number ;
10
+ /** 图表颜色 */
11
+ color ?: string ;
12
+ /** 数值 */
13
+ value : number ;
14
+ /** 数值样式 */
15
+ valueStyle ?: React . CSSProperties ;
16
+ /** 单位 */
17
+ unit ?: string ;
18
+ /** 单位样式 */
19
+ unitStyle ?: React . CSSProperties ;
20
+ /** 阈值和颜色值映射对象 */
21
+ thresholds ?: Record < string , string > ;
22
+ }
Original file line number Diff line number Diff line change 3
3
"version" : " 2.0.0" ,
4
4
"description" : " Sensoro Design G2 Plots." ,
5
5
"license" : " MIT" ,
6
+ "repository" : {
7
+ "type" : " git" ,
8
+ "url" : " https://github.com/sensoro/sensoro-design-next.git" ,
9
+ "directory" : " @sensoro-design/plots"
10
+ },
6
11
"sideEffects" : false ,
7
12
"main" : " src/index.ts" ,
8
13
"files" : [
Original file line number Diff line number Diff line change 8
8
"repository" : {
9
9
"type" : " git" ,
10
10
"url" : " https://github.com/sensoro/sensoro-design-next.git" ,
11
- "directory" : " packages/ @sensoro-design/react"
11
+ "directory" : " @sensoro-design/react"
12
12
},
13
13
"keywords" : [
14
14
" react" ,
You can’t perform that action at this time.
0 commit comments