Skip to content

Commit

Permalink
style: move likeable post checkbox to affixed in desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Feb 2, 2024
1 parent 9464dff commit 8d6c94b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/main/HomePageFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,18 @@ export const Filters = (props: Props) => {
filters = filters.filter(({ value }) => value !== 'hot')
}

if (isAffix && showLikablePostsCheckbox) {
return (
<div className={clsx('AffixCheckbox')}>
<Checkbox checked={value} onChange={e => setValue(e.target.checked)}>
<span className='ColorMuted' style={{ userSelect: 'none' }}>
Show likeable posts
</span>
</Checkbox>
</div>
)
}

return (
<div className={`DfFilters ${!isAffix ? 'mt-3' : ''}`}>
<Row className={style.DfGridParams}>
Expand Down
7 changes: 7 additions & 0 deletions src/styles/subsocial.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2340,3 +2340,10 @@ hr {
.text-wrap-balance {
text-wrap: balance;
}

.AffixCheckbox {
position: absolute;
top: 0;
right: 0;
transform: translateY(10px);
}

0 comments on commit 8d6c94b

Please sign in to comment.