Skip to content

Commit

Permalink
ctas responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
albertfolch-redeemeum committed Jan 16, 2025
1 parent d8bbc08 commit 68fc691
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,10 @@ export default function InnerCommitDetailView(
const [exchangeId, setExchangeId] = useState<string | undefined>(
externalExchangeId
);
const handleSetExchangeId = useCallback(
(newExchangeId: string) => {
setStatus("success");
setExchangeId(newExchangeId);
},
[externalExchangeId]
);
const handleSetExchangeId = useCallback((newExchangeId: string) => {
setStatus("success");
setExchangeId(newExchangeId);
}, []);
useEffect(() => {
if (externalExchangeId) {
handleSetExchangeId(externalExchangeId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,27 @@ const DividerWrapper = styled.div`
`;

const Wrapper = styled(Grid)`
container-type: inline-size;
background-color: ${getCssVar("--background-accent-color")};
box-shadow: 0px 4.318px 40px 0px rgba(21, 30, 52, 0.1);
padding: 1rem;
margin: 1rem 0;
`;
const containerBreakpoint = "400px";
const CtaGrid = styled(Grid)`
flex-direction: column;
gap: 1rem;
> * {
width: 100%;
}
@container (width > ${containerBreakpoint}) {
flex-direction: row;
gap: 2rem;
> * {
flex: 1 1 100%;
}
}
`;

const InfoWrapper = styled(Grid)`
background-color: ${getCssVar("--background-color")};
Expand Down Expand Up @@ -97,7 +113,7 @@ export const RedeemWhatsNext = ({
<Typography fontWeight={600}>What's next?</Typography>
{exchange && (
<>
<Grid gap="2rem">
<CtaGrid>
{requestShipmentProps && (
<Button
style={{ flex: "1 1 50%" }}
Expand Down Expand Up @@ -131,7 +147,7 @@ export const RedeemWhatsNext = ({
Trade Physical NFT
</ThemedButton>
</a>
</Grid>
</CtaGrid>
<DividerWrapper>
<hr />
</DividerWrapper>
Expand Down

0 comments on commit 68fc691

Please sign in to comment.