Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V 3/tabs #1311

Merged
merged 21 commits into from
Sep 6, 2023
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c9db2a3
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Aug 8, 2023
797a677
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Aug 15, 2023
5bb31c4
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Aug 15, 2023
9d7d7fb
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Aug 16, 2023
e4751ef
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Aug 16, 2023
c283ab2
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Aug 21, 2023
035cfef
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Aug 23, 2023
44b0366
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Aug 23, 2023
f00815b
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Aug 25, 2023
482e54e
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Aug 30, 2023
bf7059a
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Sep 4, 2023
362f940
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Sep 5, 2023
9b91647
Merge branch 'V3' of github.com:WalletConnect/web3modal into V3
svenvoskamp Sep 5, 2023
dfee7f2
wip
svenvoskamp Sep 6, 2023
6dc5f3c
tab refactor if length > 3
svenvoskamp Sep 6, 2023
6840421
cleanup
svenvoskamp Sep 6, 2023
d349dd8
tabs animation change
svenvoskamp Sep 6, 2023
9b25a4f
cleanup
svenvoskamp Sep 6, 2023
a5f3413
fix initial
svenvoskamp Sep 6, 2023
6521615
fix initial
svenvoskamp Sep 6, 2023
36c75a7
clean build
svenvoskamp Sep 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions packages/ui/src/composites/wui-tabs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class WuiTabs extends LitElement {
this.buttons = [...this.shadowRoot.querySelectorAll('button')]
setTimeout(() => {
this.animateTabs(0, true)
}, 1)
}, 0.1)
svenvoskamp marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand All @@ -74,8 +74,12 @@ export class WuiTabs extends LitElement {
const activeBtnTextBounds = activeBtnText?.getBoundingClientRect()

if (passiveBtn && passiveBtnText && !initialAnimation) {
animate(passiveBtnText, { opacity: 0 }, { duration: 0.25 })
animate(passiveBtn, { width: `20px` }, { duration: 0.25, delay: 0.05 })
animate(passiveBtnText, { opacity: 0 }, { duration: initialAnimation ? 0 : 0.25 })
animate(
passiveBtn,
{ width: `20px` },
{ duration: initialAnimation ? 0 : 0.25, delay: initialAnimation ? 0 : 0.05 }
)
}

if (activeBtn && activeBtnBounds && activeBtnTextBounds && activeBtnText) {
Expand All @@ -86,10 +90,14 @@ export class WuiTabs extends LitElement {
animate(
activeBtn,
{ width: `${activeBtnBounds.width + activeBtnTextBounds.width + 6}px` },
{ duration: 0.5, delay: 0.1 }
{ duration: initialAnimation ? 0 : 0.5, delay: initialAnimation ? 0 : 0.1 }
)

animate(activeBtnText, { opacity: 1 }, { duration: 0.25, delay: 0.15 })
animate(
activeBtnText,
{ opacity: 1 },
{ duration: initialAnimation ? 0 : 0.25, delay: initialAnimation ? 0 : 0.15 }
)
}
}
}
Expand Down