uppy/packages/@uppy/audio/src/DiscardButton.jsx
Antoine du Hamel 50f5f910b1
@uppy/audio: refactor to ESM (#3470)
npm package is still CommonJS, the plan is to switch that in the
next semver-major.
2022-03-09 11:29:39 +01:00

30 lines
783 B
JavaScript

import { h } from 'preact'
function DiscardButton ({ onDiscard, i18n }) {
return (
<button
className="uppy-u-reset uppy-c-btn uppy-Audio-button"
type="button"
title={i18n('discardRecordedFile')}
aria-label={i18n('discardRecordedFile')}
onClick={onDiscard}
data-uppy-super-focusable
>
<svg
width="13"
height="13"
viewBox="0 0 13 13"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
className="uppy-c-icon"
>
<g fill="#FFF" fillRule="evenodd">
<path d="M.496 11.367L11.103.76l1.414 1.414L1.911 12.781z" />
<path d="M11.104 12.782L.497 2.175 1.911.76l10.607 10.606z" />
</g>
</svg>
</button>
)
}
export default DiscardButton