metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

fix(snaps): Adjust alignment of custom UI links

Open GuillaumeRx opened this issue 4 months ago • 3 comments

Description

This PR fixes the alignment issues of the custom UI link.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

import {
  Address,
  Box,
  Button,
  Container,
  Footer,
  Link,
  Row,
  Text,
  type SnapComponent,
} from '@metamask/snaps-sdk/jsx';

/**
 * A custom dialog component.
 *
 * @returns The custom dialog component.
 */
export const CustomDialog: SnapComponent = () => (
  <Container>
    <Box>
      <Row label="Test">
        <Link href="https://metamask.io">
          <Address address="0xc366063eA70eBD30316062C9C82445591c772870" />
        </Link>
      </Row>
      <Link href="https://metamask.io">This is a link</Link>
      <Text>
        This is a long text that should wrap around and take up multiple lines
        to test the layout of the dialog with a{' '}
        <Link href="https://metamask.io">link</Link> in the middle.
      </Text>
    </Box>
    <Footer>
      <Button name="cancel">Cancel</Button>
      <Button name="confirm">Confirm</Button>
    </Footer>
  </Container>
);

Screenshots/Recordings

Before

Screenshot from 2024-10-18 14-19-24

*After

Screenshot from 2024-10-18 16-47-46

Pre-merge author checklist

Pre-merge reviewer checklist

  • [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

GuillaumeRx avatar Oct 18 '24 12:10 GuillaumeRx