Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Commit

Permalink
Merge pull request #521 from openchatai/widget/better-ui
Browse files Browse the repository at this point in the history
Use the font-family used in the body automatically
  • Loading branch information
gharbat authored Jan 12, 2024
2 parents 5dc7c09 + 3d99b1f commit e4598dc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
7 changes: 7 additions & 0 deletions copilot-widget/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
</head>

<body>
<style>
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap");
body {
font-family: "Cairo", sans-serif;
}
</style>
<button id="triggerSelector">toggle the chat widget</button>
<script type="module" src="/src/main.tsx"></script>
<script>
Expand All @@ -29,6 +35,7 @@
name: "John Doe",
},
containerProps: {
dir: "ltr",
style: {
position: "fixed",
height: "100%",
Expand Down
2 changes: 1 addition & 1 deletion copilot-widget/lib/CopilotWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function CopilotWidget({
id="opencopilot-aicopilot"
data-open={open}
className={cn(
"opencopilot-font-inter opencopilot-w-full opencopilot-overflow-hidden opencopilot-h-full sm:opencopilot-rounded-xl opencopilot-bg-white opencopilot-shadow",
"opencopilot-w-full opencopilot-overflow-hidden opencopilot-h-full sm:opencopilot-rounded-xl opencopilot-bg-white opencopilot-shadow",
"opencopilot-opacity-0 opencopilot-transition-opacity opencopilot-ease",
open &&
"opencopilot-opacity-100 opencopilot-animate-in opencopilot-fade-in",
Expand Down
2 changes: 1 addition & 1 deletion copilot-widget/lib/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function Root({
}) {
const { style, id, ...containerProp } = containerProps || {}
return (
<root.div {...containerProp} id="copilot-widget" style={{ width: '100%', height: '100%', ...style }}>
<root.div {...containerProp} id="copilot-widget" style={{ width: '100%', height: '100%', fontFamily: "inherit", ...style }}>
<ConfigDataProvider data={options}>
<WidgetState>
<AxiosProvider>
Expand Down
1 change: 0 additions & 1 deletion copilot-widget/styles/index.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
@tailwind utilities;
@tailwind components;
@tailwind base;
Expand Down
5 changes: 0 additions & 5 deletions copilot-widget/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ const config: Config = {
current,
emerald,
},
extend: {
fontFamily: {
inter: ["Inter", "sans-serif", "system-ui"],
},
},
},
plugins: [
require("tailwindcss-animate"),
Expand Down

0 comments on commit e4598dc

Please sign in to comment.