Skip to content

Commit 7122e4d

Browse files
authored
Merge pull request #67 from rtCamp/fix/popover-dark-theme-background-color
Fix Popover text very light in dark theme
2 parents cd26620 + 0e42bc5 commit 7122e4d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/frappe-ui-react/src/components/autoComplete/autoComplete.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ const Autocomplete: React.FC<AutocompleteProps> = ({
320320
)}
321321
<button
322322
type="button"
323-
className={`flex h-7 w-full items-center justify-between gap-2 rounded bg-surface-gray-2 px-2 py-1 transition-colors hover:bg-surface-gray-3 border border-transparent focus:border-outline-gray-4 focus:ring-2 focus:ring-outline-gray-3 focus:outline-none ${
323+
className={`flex h-7 w-full max-w-md items-center justify-between gap-2 rounded bg-surface-gray-2 px-2 py-1 transition-colors hover:bg-surface-gray-3 border border-transparent focus:border-outline-gray-4 focus:ring-2 focus:ring-outline-gray-3 focus:outline-none ${
324324
isComboboxOpen ? "bg-surface-gray-3" : ""
325325
}`}
326326
onClick={popoverToggle}
@@ -348,7 +348,7 @@ const Autocomplete: React.FC<AutocompleteProps> = ({
348348
)}
349349
body={({ isOpen: isPopoverOpen }) =>
350350
isPopoverOpen && (
351-
<div className="relative mt-1 rounded-lg bg-surface-modal text-base shadow-2xl">
351+
<div className="relative mt-1 w-fit max-w-md rounded-lg bg-surface-modal text-base shadow-2xl">
352352
{!hideSearch && (
353353
<div>
354354
<div className="sticky top-0 z-[100] flex items-stretch space-x-1.5 bg-surface-modal py-1.5 rounded-lg">

packages/frappe-ui-react/src/components/popover/popover.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ type Story = StoryObj<typeof Popover>;
8181

8282
// Helper to provide common Popover content
8383
const DefaultPopoverContent = () => (
84-
<div className="p-4 bg-white rounded-lg shadow-md border border-gray-200">
84+
<div className="p-4 bg-surface-modal rounded-lg shadow-md border border-gray-200">
8585
<p className="text-gray-800 text-sm">Hello from Popover!</p>
8686
<button className="mt-2 px-3 py-1 bg-blue-500 text-white rounded text-xs">
8787
Action

0 commit comments

Comments
 (0)