Skip to content

Commit

Permalink
fix(hooks-store): fix custom hook alert title and trim slash from url (
Browse files Browse the repository at this point in the history
…#5117)

* feat: fix custom hook alert title and trim slash from url

* feat: fix inline banner margin
  • Loading branch information
fairlighteth authored Nov 21, 2024
1 parent f642ce5 commit 4858b7c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function ExternalSourceAlert({ className, onChange, title, children }: Ex
return (
<styledEl.Contents className={className}>
<AlertTriangle size={48} strokeWidth={1} />
<h3>{title}</h3>
<styledEl.Title>{title}</styledEl.Title>
{children}

<styledEl.AcceptanceBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,21 @@ export const Contents = styled.div`
color: var(${UI.COLOR_DANGER_TEXT});
background: var(${UI.COLOR_DANGER_BG});
h3 {
font-size: 24px;
text-align: center;
margin: 16px 0;
font-weight: bold;
}
p {
margin: 6px 0;
}
> svg > path,
> svg > line {
stroke: var(${UI.COLOR_DANGER_TEXT});
stroke-width: 2px;
}
`

export const Title = styled.h4`
font-size: 24px;
text-align: center;
margin: 16px 0;
font-weight: bold;
width: 100%;
`

export const AcceptanceBox = styled.label`
display: flex;
gap: 6px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function AddCustomHookForm({ addHookDapp, children, isPreHook, walletType
type="text"
placeholder="Enter a hook dapp URL"
value={input}
onChange={(e) => setInput(e.target.value?.trim())}
onChange={(e) => setInput(e.target.value?.trim().replace(/\/+$/, ''))}
/>

{/* Validation and Error Messages */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ export function SwapWidget({ topContent, bottomContent }: SwapWidgetProps) {
iconSize={24}
orientation={BannerOrientation.Horizontal}
backDropBlur
margin="10px auto auto"
>
Funds stuck? <Link to={cowShedLink}>Recover your funds</Link>
</InlineBanner>
Expand Down

0 comments on commit 4858b7c

Please sign in to comment.