reactjs - Messenger 客户聊天 - 带有下一个主题的暗模式下的白色气泡
问题描述
我在我的 next.js 应用程序中使用 next-themes 到我的暗模式。我添加了 react-messenger-customer-chat 并且在暗模式下有白色边框和白色气泡。您能告诉我如何将其更改为其他颜色或隐藏吗?我使用tailwindcss。
应用程序.js
function MyApp({ Component, pageProps }) {
return (
<>
<ThemeProvider attribute="class" defaultTheme="light">
<Header />
<Component {...pageProps} />
<Footer />
{typeof window !== "undefiend" && (
<MessengerCustomerChat
pageId="1096sagsa3gsa47"
appId="2215gsagsagsaga7"
className="messenger-chat-bubble"
themeColor="#222222"
/>
)}
</ThemeProvider>
</>
);
}
我创建自定义类global.css 文件
.messenger-chat-bubble
@layer components {
.cms-content > h1,
h2 {
@apply dark:text-gray-600;
}
.messenger-chat-bubble > iframe {
@apply dark:bg-dark-posts;
}
}
没有工作,然后我尝试并没有改变。fb_customer_chat_icon 是由 facebook 定义的类
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.cms-content > h1,
h2 {
@apply dark:text-gray-600;
}
.messenger-chat-bubble > iframe {
@apply dark:bg-dark-posts;
}
.messenger-chat-bubble > .fb_customer_chat_icon {
@apply dark:bg-dark-posts;
}
}
解决方案
推荐阅读
- python - 如何使 file.split 找到一个多行字符串以将文件分成两部分?
- css - Select2 作为列表外观
- arrays - 将异构变量数组转换为结构的函数(保留名称)
- c - 使用 StringValueCStr 后是否释放内存?
- python-2.7 - 如何使用字典更新数据框中的一个值?
- json - 使用 Python 将数据帧转换为 JSON
- c - Linux ioctl for tty 提供 EPERM
- python - ValueError:无法将输入数组从形状 (6) 广播到形状 (1)
- javascript - 如何在 SAPUI5 快速视图中放置按钮?
- asp.net - Asp.Net Core 显式设置 Cookie 方案不起作用