File tree Expand file tree Collapse file tree 2 files changed +71
-0
lines changed
Expand file tree Collapse file tree 2 files changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+ import React , { Component , PropTypes } from 'react' ;
2+ import classNames from 'classnames' ;
3+ import getUnhandledProps from 'src/utils/getUnhandledProps' ;
4+ import META from 'src/utils/Meta' ;
5+
6+ export default class Statistic extends Component {
7+ static propTypes = {
8+ className : PropTypes . string ,
9+ label : PropTypes . node ,
10+ value : PropTypes . node ,
11+ } ;
12+
13+ static _meta = {
14+ library : META . library . semanticUI ,
15+ name : 'Statistics' ,
16+ type : META . type . view ,
17+ parent : 'Statistic'
18+ } ;
19+
20+ render ( ) {
21+ const classes = classNames (
22+ 'ui' ,
23+ this . props . className ,
24+ 'statistic' ,
25+ ) ;
26+
27+ const props = getUnhandledProps ( this ) ;
28+
29+ return (
30+ < div { ...props } className = { classes } >
31+ < div className = 'value' >
32+ { this . props . value }
33+ </ div >
34+ < div className = 'label' >
35+ { this . props . label }
36+ </ div >
37+ </ div >
38+ ) ;
39+ }
40+ }
Original file line number Diff line number Diff line change 1+ import React , { Component , PropTypes } from 'react' ;
2+ import classNames from 'classnames' ;
3+ import META from 'src/utils/Meta' ;
4+
5+ export default class Statistics extends Component {
6+ static propTypes = {
7+ children : PropTypes . node ,
8+ className : PropTypes . string ,
9+ } ;
10+
11+ static _meta = {
12+ library : META . library . semanticUI ,
13+ name : 'Statistics' ,
14+ type : META . type . view ,
15+ parent : 'Statistic'
16+ } ;
17+
18+ render ( ) {
19+ const classes = classNames (
20+ 'sd-buttons' ,
21+ 'ui' ,
22+ this . props . className ,
23+ 'buttons'
24+ ) ;
25+ return (
26+ < div { ...this . props } className = { classes } >
27+ { this . props . children }
28+ </ div >
29+ ) ;
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments