Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The swap button does not fit the view #623

Open
paintoshi opened this issue Sep 20, 2023 · 1 comment
Open

The swap button does not fit the view #623

paintoshi opened this issue Sep 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@paintoshi
Copy link

paintoshi commented Sep 20, 2023

Bug Description
After pressing "review swap", the swap button is too tall for the view.

image

A workaround based on #584 (comment)

Wrap your uniswap widget with <div class="uniswap"> and add next CSS:

.uniswap [color='container'] > div > div:nth-child(3) {
  position: relative;
}

.uniswap [data-testid='swap-button'] {
  margin-bottom: 16px;
}

The first part "position relative" fixes a selection hover bug. The "16px" makes the button fit by making it smaller, as seen here.

image

Or wrap the CSS in a styled div:

import styled from 'styled-components'
const WidgetContainer = styled.div`
  [color='container'] > div > div:nth-child(3) {
    position: relative;
  }

  [data-testid='swap-button'] {
    margin-bottom: 16px;
  }
`
@paintoshi paintoshi added the bug Something isn't working label Sep 20, 2023
@myInstagramAlternative
Copy link

Same here...

Btw. theme colors (container, module, dialog) are not consistent across windows/elements and pracically useless if you want to put opacity.

Example:
const theme = {
primary: "#311b49",
secondary: "#311b49",
interactive: "#65de56",
container: "rgba(0,180,254, 0.4)",
module: "rgba(0,255,254, 0.5)",
accent: "#fff",
outline: "#65de56",
dialog: "rgba(255,255,255, 0.8)",
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants