Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bthaile committed Jan 18, 2024
1 parent f94a7dd commit 6d11a93
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
3 changes: 1 addition & 2 deletions src/components/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ const Editor = ({
active,
isAnnouncementVisible,
}: EditorContainerProps) => {

return (
<>
{browser && browser.name === 'safari' ? (
<UnsupportedMessage />
) : (
<Header isAnnouncementVisible={isAnnouncementVisible}/>
<Header isAnnouncementVisible={isAnnouncementVisible} />
)}
<CookieDetector />
<FileExplorer
Expand Down
10 changes: 5 additions & 5 deletions src/components/TopNav/Announcement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { SXStyles } from 'src/types';
import { Box, Flex, Link, useThemeUI } from 'theme-ui';

const Announcement = () => {
const context = useThemeUI();
const { theme } = context;
const context = useThemeUI();
const { theme } = context;

const styles: SXStyles = {
root: {
backgroundColor: 'white',
Expand All @@ -29,8 +29,8 @@ const Announcement = () => {
padding: '0.15rem',
},
devLink: {
textDecoration: 'underline',
color: `${theme.colors.secondary}`,
textDecoration: 'underline',
color: `${theme.colors.secondary}`,
},
};

Expand Down
31 changes: 17 additions & 14 deletions src/components/TopNav/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ import TopNav from '.';
import { isMobile } from '../Editor/CadenceEditor/ControlPanel/utils';

const headerStyle = {
display: 'flex',
gridArea: 'header',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'left',
display: 'flex',
gridArea: 'header',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'left',
};

const Header = ({isAnnouncementVisible}: {isAnnouncementVisible: boolean}) => {
return (
<header style={headerStyle}>
{!isMobile() && isAnnouncementVisible && <AnnouncementBar />}
<TopNav />

</header>
);
const Header = ({
isAnnouncementVisible,
}: {
isAnnouncementVisible: boolean;
}) => {
return (
<header style={headerStyle}>

Check failure on line 20 in src/components/TopNav/Header.tsx

View workflow job for this annotation

GitHub Actions / Linter and Unit Tests (16.x)

Type '{ display: string; gridArea: string; flexDirection: string; alignItems: string; justifyContent: string; }' is not assignable to type 'CSSProperties'.
{!isMobile() && isAnnouncementVisible && <AnnouncementBar />}
<TopNav />
</header>
);
};

export default Header;
export default Header;
4 changes: 3 additions & 1 deletion src/containers/Playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ const getBaseStyles = (
display: 'grid',
gridTemplateAreas: "'header header' 'sidebar main'",
gridTemplateColumns: `[sidebar] ${fileExplorerWidth} [main] auto`,
gridTemplateRows: isAnnouncementVisible ? ['40px auto', '105px auto'] : ['40px auto', '50px auto'],
gridTemplateRows: isAnnouncementVisible
? ['40px auto', '105px auto']
: ['40px auto', '50px auto'],
overflow: 'hidden',
filter: showProjectsSidebar ? 'blur(1px)' : 'none',
};
Expand Down

0 comments on commit 6d11a93

Please sign in to comment.