-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: measure container width and use it in ItemGrid
- Loading branch information
1 parent
7764bcf
commit a4baaac
Showing
6 changed files
with
21 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import { DASHBOARD_WRAPPER_LR_MARGIN_PX } from './gridUtil.js' | ||
|
||
const SMALL_SCREEN_BREAKPOINT = 480 | ||
|
||
export const isSmallScreen = (width) => width <= SMALL_SCREEN_BREAKPOINT | ||
|
||
export const getBreakpoint = () => | ||
SMALL_SCREEN_BREAKPOINT - DASHBOARD_WRAPPER_LR_MARGIN_PX | ||
export const getBreakpoint = (containerWidth) => | ||
SMALL_SCREEN_BREAKPOINT - (window.innerWidth - containerWidth) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters