Skip to content

Commit 9139d02

Browse files
committed
Add pencil icon next to p5 version
1 parent cb255e2 commit 9139d02

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

client/images/pencil.svg

Lines changed: 1 addition & 1 deletion
Loading

client/modules/IDE/components/VersionIndicator.jsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,26 @@ import { useTranslation } from 'react-i18next';
44
import { useDispatch } from 'react-redux';
55
import { openPreferences } from '../actions/ide';
66
import { setPreferencesTab } from '../actions/preferences';
7-
import { remSize, prop } from '../../../theme';
7+
import { prop } from '../../../theme';
8+
import EditIcon from '../../../images/pencil.svg';
89

910
import { useP5Version } from '../hooks/useP5Version';
1011

1112
const VersionPickerButton = styled.button`
1213
color: ${prop('Button.primary.default.foreground')};
14+
1315
&:hover {
1416
color: ${prop('Button.primary.hover.background')} !important;
1517
}
18+
19+
& svg {
20+
vertical-align: middle;
21+
margin-bottom: 2px;
22+
}
23+
24+
&:hover path {
25+
fill: currentColor !important;
26+
}
1627
`;
1728

1829
const VersionIndicator = () => {
@@ -30,6 +41,11 @@ const VersionIndicator = () => {
3041
{t('Toolbar.LibraryVersion')}
3142
 
3243
{versionInfo?.version || t('Toolbar.CustomLibraryVersion')}
44+
<EditIcon
45+
className="editable-input__icon"
46+
focusable="false"
47+
aria-hidden="true"
48+
/>
3349
</VersionPickerButton>
3450
);
3551
};

translations/locales/en-US/translations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"EditSketchARIA": "Edit sketch name",
158158
"NewSketchNameARIA": "New sketch name",
159159
"By": " by ",
160-
"LibraryVersion": "p5.js Version:",
160+
"LibraryVersion": "p5.js version:",
161161
"CustomLibraryVersion": "Custom"
162162
},
163163
"Console": {

0 commit comments

Comments
 (0)