Skip to content

Commit 78f0916

Browse files
RoyEJohnsonclaudeCopilot
committed
Cleanup
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Co-Authored-By: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent eb40a43 commit 78f0916

2 files changed

Lines changed: 4 additions & 14 deletions

File tree

src/app/content/components/Toolbar/Toolbar.legacy.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* using the old API while the Toolbar component itself has been migrated to plain CSS.
77
*
88
* Files that import from this module:
9-
* - Topbar/styled.tsx (barPadding, buttonMinWidth, PlainButton)
9+
* - Topbar/styled.tsx (buttonMinWidth, PlainButton)
1010
* - popUp/PrintButton.ts (PrintOptions)
1111
* - TableOfContents/index.tsx (LeftArrow, TimesIcon)
1212
* - SidebarControl/Buttons.tsx (toolbarDefaultButton, toolbarDefaultText)
@@ -18,7 +18,6 @@
1818

1919
import React from 'react';
2020
import styled, { css } from 'styled-components/macro';
21-
import { maxNavWidth } from '../../../components/NavBar/styled';
2221
import Times from '../../../components/Times';
2322
import {
2423
textRegularSize,
@@ -39,15 +38,6 @@ export const toolbarDefaultText = css`
3938
`)}
4039
`;
4140

42-
export const barPadding = css`
43-
max-width: ${maxNavWidth}rem;
44-
margin: 0 auto;
45-
width: calc(100% - ${theme.padding.page.desktop}rem * 2);
46-
${theme.breakpoints.mobile(css`
47-
width: calc(100% - ${theme.padding.page.mobile}rem * 2);
48-
`)}
49-
`;
50-
5141
export const toolbarDefaultButton = css`
5242
display: flex;
5343
flex-direction: column;

src/app/content/components/Toolbar/styled.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ interface ToolbarWrapperProps extends React.HTMLAttributes<HTMLDivElement> {
6363
}
6464

6565
export const ToolbarWrapper = React.forwardRef<HTMLDivElement, ToolbarWrapperProps>(
66-
function ToolbarWrapper({ isMobileMenuOpen, className, style, children, ...props }, ref) {
66+
({ isMobileMenuOpen, className, style, children, ...props }, ref) => {
6767
return (
6868
<div
6969
ref={ref}
@@ -117,7 +117,7 @@ interface PlainButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
117117
}
118118

119119
export const PlainButton = React.forwardRef<HTMLButtonElement, PlainButtonProps>(
120-
function PlainButton({ className, style, children, ...props }, ref) {
120+
({ className, style, children, ...props }, ref) => {
121121
// Filter out transient props (starting with $) to prevent them from being forwarded to the DOM
122122
// Styled-components uses transient props for style-only props that shouldn't appear as HTML attributes
123123
const safeProps = Object.keys(props).reduce((acc, key) => {
@@ -148,7 +148,7 @@ interface PrintOptWrapperProps extends React.ButtonHTMLAttributes<HTMLButtonElem
148148
}
149149

150150
export const PrintOptWrapper = React.forwardRef<HTMLButtonElement, PrintOptWrapperProps>(
151-
function PrintOptWrapper({ isActive, className, children, ...props }, ref) {
151+
({ isActive, className, children, ...props }, ref) => {
152152
return (
153153
<button
154154
ref={ref}

0 commit comments

Comments
 (0)