Skip to content

Commit cb255e2

Browse files
committed
Add better hover state for version picker
1 parent 261fd12 commit cb255e2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

client/modules/IDE/components/VersionIndicator.jsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
import React, { useCallback } from 'react';
2+
import styled from 'styled-components';
23
import { useTranslation } from 'react-i18next';
34
import { useDispatch } from 'react-redux';
45
import { openPreferences } from '../actions/ide';
56
import { setPreferencesTab } from '../actions/preferences';
7+
import { remSize, prop } from '../../../theme';
68

79
import { useP5Version } from '../hooks/useP5Version';
810

11+
const VersionPickerButton = styled.button`
12+
color: ${prop('Button.primary.default.foreground')};
13+
&:hover {
14+
color: ${prop('Button.primary.hover.background')} !important;
15+
}
16+
`;
17+
918
const VersionIndicator = () => {
1019
const { versionInfo } = useP5Version();
1120
const { t } = useTranslation();
@@ -17,11 +26,11 @@ const VersionIndicator = () => {
1726
}, []);
1827

1928
return (
20-
<button onClick={openVersionSettings}>
29+
<VersionPickerButton onClick={openVersionSettings}>
2130
{t('Toolbar.LibraryVersion')}
2231
&nbsp;
2332
{versionInfo?.version || t('Toolbar.CustomLibraryVersion')}
24-
</button>
33+
</VersionPickerButton>
2534
);
2635
};
2736

0 commit comments

Comments
 (0)