Skip to content

Commit

Permalink
dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoapolo committed Jan 10, 2025
1 parent 9d6c582 commit 60187ce
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions frontend/web/components/modals/RuleInputValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ const RuleInputValue = (props: RuleInputValueProps) => {
}

const showIcon = hasWarning || isLongText
const isDarkMode = Utils.getFlagsmithHasFeature('dark_mode')

return (
<div className='relative'>
<Input
Expand All @@ -129,11 +131,13 @@ const RuleInputValue = (props: RuleInputValueProps) => {
}
/>
{showIcon && (
<div style={{ position: 'absolute', right: 5, top: 10 }}>
<div style={{ position: 'absolute', right: 5, top: 9 }}>
<Tooltip
title={
<div
className={`flex bg-white bg-opacity-10 rounded-2 p-1 ${
className={`flex ${
isDarkMode ? 'bg-white' : 'bg-black'
} bg-opacity-10 rounded-2 p-1 ${
hasWarning ? '' : 'cursor-pointer'
}`}
onClick={() => {
Expand All @@ -150,7 +154,11 @@ const RuleInputValue = (props: RuleInputValueProps) => {
>
<Icon
name={hasWarning ? 'warning' : 'unfold'}
fill={hasWarning ? undefined : '#fff'}
fill={
hasWarning
? undefined
: `${isDarkMode ? '#fff' : '#1A2634'}`
}
width={18}
height={18}
/>
Expand Down

0 comments on commit 60187ce

Please sign in to comment.