Commit 9ced7147 authored by gnewfield's avatar gnewfield Committed by GitHub

fix: improve currency select styling (#7009)

* fix: remove currency select drop shadows and make deposit label non-interactive

* rename labelOnly prop to pointerEvents
parent 8ed6481f
...@@ -68,12 +68,11 @@ const CurrencySelect = styled(ButtonGray)<{ ...@@ -68,12 +68,11 @@ const CurrencySelect = styled(ButtonGray)<{
selected: boolean selected: boolean
hideInput?: boolean hideInput?: boolean
disabled?: boolean disabled?: boolean
pointerEvents?: string
}>` }>`
align-items: center; align-items: center;
background-color: ${({ selected, theme }) => (selected ? theme.backgroundInteractive : theme.accentAction)}; background-color: ${({ selected, theme }) => (selected ? theme.backgroundInteractive : theme.accentAction)};
opacity: ${({ disabled }) => (!disabled ? 1 : 0.4)}; opacity: ${({ disabled }) => (!disabled ? 1 : 0.4)};
box-shadow: ${({ selected }) => (selected ? 'none' : '0px 6px 10px rgba(0, 0, 0, 0.075)')};
box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.075);
color: ${({ selected, theme }) => (selected ? theme.textPrimary : theme.white)}; color: ${({ selected, theme }) => (selected ? theme.textPrimary : theme.white)};
cursor: pointer; cursor: pointer;
border-radius: 16px; border-radius: 16px;
...@@ -92,6 +91,7 @@ const CurrencySelect = styled(ButtonGray)<{ ...@@ -92,6 +91,7 @@ const CurrencySelect = styled(ButtonGray)<{
background-color: ${({ selected, theme }) => (selected ? theme.deprecated_bg3 : darken(0.05, theme.accentAction))}; background-color: ${({ selected, theme }) => (selected ? theme.deprecated_bg3 : darken(0.05, theme.accentAction))};
} }
visibility: ${({ visible }) => (visible ? 'visible' : 'hidden')}; visibility: ${({ visible }) => (visible ? 'visible' : 'hidden')};
${({ pointerEvents }) => pointerEvents && `pointer-events: none`}
` `
const InputRow = styled.div<{ selected: boolean }>` const InputRow = styled.div<{ selected: boolean }>`
...@@ -259,6 +259,7 @@ export default function CurrencyInputPanel({ ...@@ -259,6 +259,7 @@ export default function CurrencyInputPanel({
setModalOpen(true) setModalOpen(true)
} }
}} }}
pointerEvents={!onCurrencySelect ? 'none' : undefined}
> >
<Aligner> <Aligner>
<RowFixed> <RowFixed>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment