-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move feedback class to integration.ts, make isAnonymous work, hide fa…
…lse in createElement
- Loading branch information
Showing
9 changed files
with
524 additions
and
497 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { FeedbackTheme } from '../types'; | ||
|
||
/** | ||
* Creates <style> element for widget actor (button that opens the dialog) | ||
*/ | ||
export function createMainStyles(d: Document, theme: FeedbackTheme): HTMLStyleElement { | ||
const style = d.createElement('style'); | ||
style.textContent = ` | ||
:host { | ||
position: fixed; | ||
right: 1rem; | ||
bottom: 1rem; | ||
font-family: 'Helvetica Neue', Arial, sans-serif; | ||
font-size: 14px; | ||
--bg-color: ${theme.light.background}; | ||
--bg-hover-color: #f6f6f7; | ||
--fg-color: ${theme.light.foreground}; | ||
--error-color: #df3338; | ||
--success-color: #268d75; | ||
--border: 1.5px solid rgba(41, 35, 47, 0.13); | ||
--box-shadow: 0px 4px 24px 0px rgba(43, 34, 51, 0.12); | ||
} | ||
.__dark-mode:host { | ||
--bg-color: ${theme.dark.background}; | ||
--bg-hover-color: #352f3b; | ||
--fg-color: ${theme.dark.foreground}; | ||
--error-color: #f55459; | ||
--success-color: #2da98c; | ||
--border: 1.5px solid rgba(235, 230, 239, 0.15); | ||
--box-shadow: 0px 4px 24px 0px rgba(43, 34, 51, 0.12); | ||
} | ||
`; | ||
|
||
return style; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters