Skip to content

Commit

Permalink
perf: Modal input css (pancakeswap#4132)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChefMomota committed Jun 24, 2022
1 parent e97142d commit eb96b01
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/components/Modal/ModalInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,12 @@ interface ModalInputProps {
decimals?: number
}

const getBoxShadow = ({ isWarning = false, theme }) => {
if (isWarning) {
return theme.shadows.warning
}

return theme.shadows.inset
}

const StyledTokenInput = styled.div<InputProps>`
display: flex;
flex-direction: column;
background-color: ${({ theme }) => theme.colors.input};
border-radius: 16px;
box-shadow: ${getBoxShadow};
box-shadow: ${({ theme, isWarning }) => (isWarning ? theme.colors.warning : theme.shadows.inset)};
color: ${({ theme }) => theme.colors.text};
padding: 8px 16px 8px 0;
width: 100%;
Expand Down

0 comments on commit eb96b01

Please sign in to comment.