mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 10:35:11 +00:00
src/sponsor: Fix button doing nothing.
Now it copies the address to the clipboard for convenience.
This commit is contained in:
committed by
David Lechner
parent
e01fb1fbe9
commit
96f9ce313f
@@ -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">
|
||||
|
||||
<sup>
|
||||
<Icon icon="duplicate" iconSize={12} />
|
||||
</sup>
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
export default ClipboardIcon;
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user