Download wp-calypso/client/components/chart/bar-tooltip.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 690 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/chart/bar-tooltip.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/chart/bar-tooltip.jsx
-
curl -L -o bar-tooltip.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/chart/bar-tooltip.jsx
690 Bytes
| import clsx from 'clsx'; | |
| import PropTypes from 'prop-types'; | |
| import { PureComponent } from 'react'; | |
| export default class ChartBarTooltip extends PureComponent { | |
| static propTypes = { | |
| className: PropTypes.string, | |
| icon: PropTypes.object, | |
| label: PropTypes.string, | |
| value: PropTypes.string, | |
| }; | |
| render() { | |
| return ( | |
| <li className={ clsx( 'module-content-list-item', this.props.className ) }> | |
| <span className="chart__tooltip-wrapper wrapper"> | |
| <span className="chart__tooltip-value value">{ this.props.value }</span> | |
| <span className="chart__tooltip-label label"> | |
| { this.props.icon || null } | |
| { this.props.label } | |
| </span> | |
| </span> | |
| </li> | |
| ); | |
| } | |
| } | |