diff --git a/src/streamlit_paste_button/frontend/main.js b/src/streamlit_paste_button/frontend/main.js index 8b7880a..ff03e18 100644 --- a/src/streamlit_paste_button/frontend/main.js +++ b/src/streamlit_paste_button/frontend/main.js @@ -58,6 +58,11 @@ function onRender(event) { // Set the button's text font pasteButton.style.fontFamily = event.detail.theme.font; + + if (data.theme) { + // Change the body's background color to match the theme's background color + document.body.style.backgroundColor = data.theme.backgroundColor; + } // pasteButton.onclick = event => { // parseClipboardData(); diff --git a/src/streamlit_paste_button/frontend/style.css b/src/streamlit_paste_button/frontend/style.css index 63a9519..5a39db4 100644 --- a/src/streamlit_paste_button/frontend/style.css +++ b/src/streamlit_paste_button/frontend/style.css @@ -30,3 +30,17 @@ button:not(:disabled) { } +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + text-align: left; + background-color: #fff; +} + +