metamask-extension
metamask-extension copied to clipboard
fix(snaps): Adjust alignment of custom UI links
Description
This PR fixes the alignment issues of the custom UI link.
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
*After
Pre-merge author checklist
- [ ] I've followed MetaMask Contributor Docs and MetaMask Extension Coding Standards.
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using JSDoc format if applicable
- [ ] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
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.