mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
23 lines
559 B
JavaScript
23 lines
559 B
JavaScript
import PropTypes from 'prop-types'
|
|
import React from 'react'
|
|
import CSSModules from 'browser/lib/CSSModules'
|
|
import styles from './TrashButton.styl'
|
|
import i18n from 'browser/lib/i18n'
|
|
|
|
const TrashButton = ({
|
|
onClick
|
|
}) => (
|
|
<button styleName='control-trashButton'
|
|
onClick={(e) => onClick(e)}
|
|
>
|
|
<img src='../resources/icon/icon-trash.svg' />
|
|
<span lang={i18n.locale} styleName='tooltip'>{i18n.__('Trash')}</span>
|
|
</button>
|
|
)
|
|
|
|
TrashButton.propTypes = {
|
|
onClick: PropTypes.func.isRequired
|
|
}
|
|
|
|
export default CSSModules(TrashButton, styles)
|