mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
move images out of public/static folder
This way, we get compile error if there problem with images. Also allows images to be optimized.
This commit is contained in:
committed by
David Lechner
parent
865d37a138
commit
3e4ea382e5
@@ -9,6 +9,8 @@ import { RootState } from '../reducers';
|
||||
import { BLEConnectionState } from '../reducers/ble';
|
||||
import { BootloaderConnectionState } from '../reducers/bootloader';
|
||||
import ActionButton, { ActionButtonProps } from './ActionButton';
|
||||
import btConnectedIcon from './images/bt-connected.svg';
|
||||
import btDisconnectedIcon from './images/bt-disconnected.svg';
|
||||
|
||||
type Dispatch = ThunkDispatch<{}, {}, AnyAction>;
|
||||
|
||||
@@ -23,14 +25,14 @@ const mapStateToProps = (state: RootState): StateProps => {
|
||||
) {
|
||||
return {
|
||||
tooltip: 'Connect using Bluetooth',
|
||||
icon: 'btdisconnected.svg',
|
||||
icon: btDisconnectedIcon,
|
||||
context: 'connect',
|
||||
enabled: true,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
tooltip: 'Disconnect Bluetooth',
|
||||
icon: 'btconnected.svg',
|
||||
icon: btConnectedIcon,
|
||||
context: 'disconnect',
|
||||
enabled: state.ble.connection === BLEConnectionState.Connected,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user