gristlabs_grist-core/app/client/ui/BottomBar.ts
Cyprien P ffe4a34335 (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
2021-01-14 18:30:48 +01:00

17 lines
439 B
TypeScript

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;
`);