Skip to content

Banner fixes #3532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions client/common/icons.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { prop } from '../theme';

Check warning on line 4 in client/common/icons.jsx

View workflow job for this annotation

GitHub Actions / Test and lint code base

'prop' is defined but never used

Check warning on line 4 in client/common/icons.jsx

View workflow job for this annotation

GitHub Actions / Test and lint code base

'prop' is defined but never used
import SortArrowUp from '../images/sort-arrow-up.svg';
import SortArrowDown from '../images/sort-arrow-down.svg';
import Github from '../images/github.svg';
Expand Down Expand Up @@ -35,20 +35,20 @@
function withLabel(SvgComponent) {
const StyledIcon = styled(SvgComponent)`
&&& {
color: ${prop('Icon.default')};
color: ${(props) => props.Icon?.default};
& g,
& path,
& polygon {
opacity: 1;
fill: ${prop('Icon.default')};
fill: ${(props) => props.Icon?.default};
}
&:hover {
color: ${prop('Icon.hover')};
color: ${(props) => props.Icon?.hover};
& g,
& path,
& polygon {
opacity: 1;
fill: ${prop('Icon.hover')};
fill: ${(props) => props.Icon?.hover};
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion client/images/cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions client/modules/IDE/components/Banner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const Banner = ({ onClose }) => {
const bannerURL = 'https://openprocessing.org/curation/89576';
const bannerCopy = (
<>
We’re accepting p5.js sketches for a special curation exploring the new
features in p5.js 2.0!{' '}
We’re accepting p5.js sketches for a special curation exploring mental
health and the newest features in p5.js 2.0!{' '}
<span style={{ fontWeight: 600 }}>Submit by July 13!</span>
</>
);
Expand All @@ -36,7 +36,7 @@ const Banner = ({ onClose }) => {
<div className="banner">
<a href={bannerURL}>{bannerCopy}</a>
<button className="banner-close-button" onClick={onClose}>
<CrossIcon />
<CrossIcon Icon={{ default: '#000', hover: '#333' }} />
</button>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ exports[`Nav renders dashboard version for mobile 1`] = `
>
<test-file-stub
aria-hidden="true"
classname="icons__StyledIcon-sc-xmer15-0 dStXqm"
classname="icons__StyledIcon-sc-xmer15-0 kjSZIe"
focusable="false"
/>
</button>
Expand All @@ -351,7 +351,7 @@ exports[`Nav renders dashboard version for mobile 1`] = `
>
<test-file-stub
aria-hidden="true"
classname="icons__StyledIcon-sc-xmer15-0 dStXqm"
classname="icons__StyledIcon-sc-xmer15-0 kjSZIe"
focusable="false"
/>
</button>
Expand Down Expand Up @@ -930,7 +930,7 @@ exports[`Nav renders editor version for mobile 1`] = `
>
<test-file-stub
aria-hidden="true"
classname="icons__StyledIcon-sc-xmer15-0 dStXqm"
classname="icons__StyledIcon-sc-xmer15-0 kjSZIe"
focusable="false"
/>
</button>
Expand All @@ -946,7 +946,7 @@ exports[`Nav renders editor version for mobile 1`] = `
>
<test-file-stub
aria-hidden="true"
classname="icons__StyledIcon-sc-xmer15-0 dStXqm"
classname="icons__StyledIcon-sc-xmer15-0 kjSZIe"
focusable="false"
/>
</button>
Expand Down
10 changes: 6 additions & 4 deletions client/styles/components/_banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
border-bottom: 1px solid #000;

a {
color: #000;
}
color: $black;

a:hover {
text-decoration: underline;
&:hover {
color: $black;
text-decoration: underline;
}
}

@media (max-width: 770px) {
Expand All @@ -27,4 +28,5 @@
height: 20px;
width:20px;
float: right;
cursor: pointer;
}