Skip to content

Commit

Permalink
Resolve ui bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiendekaco committed Feb 21, 2024
1 parent 11ce531 commit a681077
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ export type CommonPositions =
| 'bottomRight'
| 'bottomLeft'
| 'topLeft'
| 'topCenter'

export type AccountCenterPosition = CommonPositions

Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ const commonPositions = Joi.string().valid(
'topRight',
'bottomRight',
'bottomLeft',
'topLeft'
'topLeft',
'topCenter'
)

const gasPriceProbabilities = [70, 80, 90, 95, 99]
Expand Down
13 changes: 10 additions & 3 deletions packages/core/src/views/Index.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

<script lang="ts">
import { shareReplay, startWith } from 'rxjs/operators'
import { connectWallet$, switchChainModal$, wallets$ } from '../streams.js'
Expand Down Expand Up @@ -27,17 +28,23 @@
const setPositioningDefaults = (targetComponentVariable: string) => {
return {
topLeft: `
top: var(--${targetComponentVariable}-position-top, 0);
top: var(--${targetComponentVariable}-position-top, 24px);
left: var(--${targetComponentVariable}-position-left, 0);`,
topRight: `
top: var(--${targetComponentVariable}-position-top, 0);
top: var(--${targetComponentVariable}-position-top, 24px);
right: var(--${targetComponentVariable}-position-right, 0);`,
bottomRight: `
bottom: var(--${targetComponentVariable}-position-bottom, 0);
right: var(--${targetComponentVariable}-position-right, 0);`,
bottomLeft: `
bottom: var(--${targetComponentVariable}-position-bottom, 0);
left: var(--${targetComponentVariable}-position-left, 0);`
left: var(--${targetComponentVariable}-position-left, 0);`,
topCenter:
` top: var(--${targetComponentVariable}-position-top, 24px);
left: var(--${targetComponentVariable}-position-center, 50%);
transform: translate(-50%, -50%);
`
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/views/notify/Notification.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
pointer-events: all;
backdrop-filter: blur(5px);
min-height: 56px;
max-width: 318px;
display: flex;
align-items: center;
gap: var(--spacing-4);
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/web3-onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export default init({
// }
// }
},
position: 'topLeft'
position: 'topCenter'
}
}
})

0 comments on commit a681077

Please sign in to comment.