mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
ffe4a34335
Test Plan: Tested Manually, behave well also for long page name. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2702
17 lines
439 B
TypeScript
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;
|
|
`);
|