add Bootstrap working example
• re-organize file structure with one directory per dialog • add index.html file per dialog • add bootstrap styling and dynamic cdn loading • clean up react code and stylesheet npm setup script update adds force flag "setup": "rm -f .clasp.json ..." Update README.md Move clasp to devDependencies update dynamic cdn urls Add repository field
This commit is contained in:
+12
-4
@@ -1,19 +1,27 @@
|
||||
export const onOpen = () => {
|
||||
SpreadsheetApp.getUi()
|
||||
.createMenu('My Sample React Project') // edit me!
|
||||
.addItem('Sheet Name Editor', 'openDialog')
|
||||
.addItem('Sheet Editor', 'openDialog')
|
||||
.addItem('Sheet Editor (Bootstrap)', 'openDialogBootstrap')
|
||||
.addItem('About me', 'openAboutSidebar')
|
||||
.addToUi();
|
||||
};
|
||||
|
||||
export const openDialog = () => {
|
||||
const html = HtmlService.createHtmlOutputFromFile('main')
|
||||
.setWidth(400)
|
||||
const html = HtmlService.createHtmlOutputFromFile('dialog-demo')
|
||||
.setWidth(600)
|
||||
.setHeight(600);
|
||||
SpreadsheetApp.getUi().showModalDialog(html, 'Sheet Editor');
|
||||
};
|
||||
|
||||
export const openDialogBootstrap = () => {
|
||||
const html = HtmlService.createHtmlOutputFromFile('dialog-demo-bootstrap')
|
||||
.setWidth(600)
|
||||
.setHeight(600);
|
||||
SpreadsheetApp.getUi().showModalDialog(html, 'Sheet Editor (Bootstrap)');
|
||||
};
|
||||
|
||||
export const openAboutSidebar = () => {
|
||||
const html = HtmlService.createHtmlOutputFromFile('about');
|
||||
const html = HtmlService.createHtmlOutputFromFile('sidebar-about-page');
|
||||
SpreadsheetApp.getUi().showSidebar(html);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user