feat: refine mobile dashboard experience
This commit is contained in:
1 parent
2e3dca3e87
commit
84db2f9d49
68 files changed
+1425
-1311
No files matched your search
@@ -0,0 +1,13 @@
|
||||
interface FocusMobileBoardSectionOptions {
|
||||
anchorId: string;
|
||||
reduceMotion: boolean;
|
||||
}
|
||||
|
||||
export const focusMobileBoardSection = ({ anchorId, reduceMotion }: FocusMobileBoardSectionOptions): boolean => {
|
||||
const heading = document.getElementById(anchorId);
|
||||
if (!heading) return false;
|
||||
|
||||
heading.scrollIntoView({ behavior: reduceMotion ? "auto" : "smooth", block: "start" });
|
||||
heading.focus({ preventScroll: true });
|
||||
return true;
|
||||
};
|
||||
Reference in new issue
Block a user