Skip to content

Commit

Permalink
fix padding of selected list item in side bar
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Aug 29, 2024
1 parent bf6d8fd commit e30d409
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions v2/web/components/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ const LIST_SX = {
overscrollBehavior: 'none',
fontSize: '0.875rem',
};
const LIST_ITEM_SX = {
padding: '0 8px',
};

interface Props {
headings: Heading[];
Expand Down Expand Up @@ -136,7 +133,7 @@ export const SideBar: React.FC<Props> = ({ headings, path }) => {
const selected = !!h.current;
const ref = selected ? focusedRef : undefined;
const style = {
padding: `0 0 0 ${h.level - 1}em`,
padding: `0 1em 0 ${h.level}em`,
};
const sx = {
color: selected ? 'text.primary' : 'text.secondary',
Expand All @@ -152,7 +149,6 @@ export const SideBar: React.FC<Props> = ({ headings, path }) => {
});
}}
disablePadding
sx={LIST_ITEM_SX}
ref={ref}
key={key}
>
Expand Down

0 comments on commit e30d409

Please sign in to comment.