src/sponsor: Fix button doing nothing.

Now it copies the address to the clipboard for convenience.
This commit is contained in:
Laurens Valk
2022-11-25 13:40:44 -06:00
committed by David Lechner
parent e01fb1fbe9
commit 96f9ce313f
3 changed files with 38 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2021-2022 The Pybricks Authors
// Icon for indicating external links
import { Icon } from '@blueprintjs/core';
import React from 'react';
import './clipboard.scss';
const ClipboardIcon: React.VFC = (_props) => {
return (
<span className="pb-clipboard">
&nbsp;
<sup>
<Icon icon="duplicate" iconSize={12} />
</sup>
</span>
);
};
export default ClipboardIcon;
+13
View File
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2021-2022 The Pybricks Authors
@use '@blueprintjs/core/lib/scss/variables' as bp;
span.pb-clipboard {
white-space: nowrap;
}
// override some button magic in case this is used in a button
.#{bp.$ns}-button .pb-clipboard .#{bp.$ns}-icon:first-child:last-child {
margin: 0;
}