Skip to content

Commit

Permalink
Move heading to the right 4px to align with favicons
Browse files Browse the repository at this point in the history
  • Loading branch information
greyivy committed Jan 30, 2025
1 parent a46c78a commit f1589f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function ActivityConfigured({ expansion, toggle }) {
return (
<div class={styles.root}>
<ActivityHeading
className={styles.activityHeading}
trackerCount={count.value}
itemCount={itemCount.value}
onToggle={toggle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,4 +295,8 @@
transform: rotate(180deg)
}
}
}

.activityHeading {
margin-left: 4px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ export function Heading({ expansion, canExpand, recent, onToggle, buttonAttrs =
* @param {number} props.itemCount
* @param {boolean} props.canExpand
* @param {() => void} props.onToggle
* @param {string} [props.className]
* @param {import("preact").ComponentProps<'button'>} [props.buttonAttrs]
*/
export function ActivityHeading({ expansion, canExpand, itemCount, trackerCount, onToggle, buttonAttrs = {} }) {
const { t } = useTypedTranslationWith(/** @type {Strings} */ ({}));
export function ActivityHeading({ expansion, canExpand, itemCount, trackerCount, onToggle, className, buttonAttrs = {} }) {
const { t } = useTypedTranslationWith(/** @type {Strings} */({}));
const [formatter] = useState(() => new Intl.NumberFormat());

const none = itemCount === 0;
Expand All @@ -161,7 +162,7 @@ export function ActivityHeading({ expansion, canExpand, itemCount, trackerCount,
trackerCount === 1 ? t('stats_countBlockedSingular') : t('stats_countBlockedPlural', { count: trackerCountFormatted });

return (
<div className={styles.heading} data-testid={'ActivityHeading'}>
<div className={cn(styles.heading, className)} data-testid={'ActivityHeading'}>
<span className={styles.headingIcon}>
<img src="./icons/shield.svg" alt="Privacy Shield" />
</span>
Expand Down

0 comments on commit f1589f9

Please sign in to comment.