mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Adds current page name to the bottom bar [narrow screen]
Test Plan: Tested Manually, behave well also for long page name. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2702
This commit is contained in:
16
app/client/ui/BottomBar.ts
Normal file
16
app/client/ui/BottomBar.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import {DocPageModel} from 'app/client/models/DocPageModel';
|
||||
import {dom, MultiHolder, styled} from 'grainjs';
|
||||
|
||||
|
||||
export function createBottomBarDoc(owner: MultiHolder, pageModel: DocPageModel) {
|
||||
return dom.maybe(pageModel.gristDoc, (gristDoc) => (
|
||||
cssPageName(dom.text(gristDoc.currentPageName))
|
||||
));
|
||||
}
|
||||
|
||||
const cssPageName = styled('div', `
|
||||
margin: 0 10px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
`);
|
||||
Reference in New Issue
Block a user