Skip to content

Commit 06c5318

Browse files
authored
Merge pull request #17 from reearth/refactor/example_background
refactor: ui and popup background to white
2 parents 6221910 + 31f803f commit 06c5318

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/content/code/plugin-api/popup/show-popup.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
// @ts-nocheck
22

33
// Example 1. Display a simple notification popup
4-
reearth.popup.show("You have successfully updated your profile.", {
4+
reearth.popup.show(`
5+
<h1 style='color:blue;background:white'>
6+
You have successfully updated your profile.
7+
</h1>`, {
58
// Set the popup width to 300 pixels
69
width: 300,
710
// Set the popup height to 100 pixels
@@ -13,7 +16,10 @@ reearth.popup.show("You have successfully updated your profile.", {
1316
});
1417

1518
// Example 2. Show a popup with custom HTML, width, and offset adjustments on both axes
16-
reearth.popup.show("<p>Custom Popup Content</p>", {
19+
reearth.popup.show(`
20+
<p style='color:blue;background:white'>
21+
Custom Popup Content
22+
</p>`, {
1723
width: "300px",
1824
height: "150px",
1925
position: "top-start", // Position popup at the top-left of the target

src/content/code/plugin-api/ui/show-ui.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-nocheck
22

33
const html = `
4-
<h1 style="color:red;background:black">
4+
<h1 style="color:red;background:white">
55
Hello world
66
</h1>
77
`;

0 commit comments

Comments
 (0)