Skip to content

Commit

Permalink
whole row clickable to expand
Browse files Browse the repository at this point in the history
  • Loading branch information
corwintines committed Jun 30, 2022
1 parent 7a4ec90 commit f75d8d8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 49 deletions.
2 changes: 1 addition & 1 deletion src/components/FindWallet/WalletPersonasSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const Persona = styled.div<{
flex-direction: column;
align-items: flex-start;
padding: 1.5rem;
background: ${({ selection, isDark, theme }) =>
background: ${({ selected, isDark, theme }) =>
selected
? isDark
? theme.colors.primary900
Expand Down
61 changes: 17 additions & 44 deletions src/components/FindWallet/WalletTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const WalletContentHeader = styled(Grid)`

const Wallet = styled(Grid)`
padding: 25px 4px;
cursor: pointer;
td {
padding: 0;
border-bottom: none;
Expand Down Expand Up @@ -399,10 +400,10 @@ const Socials = styled.div`
height: auto;
align-items: center;
display: flex;
transform: scale(1);
transform: scale(1);
transition: transform 0.1s;
:hover {
transform: scale(1.15);
transform: scale(1.15);
transition: transform 0.1s;
}
}
Expand Down Expand Up @@ -776,7 +777,16 @@ const WalletTable = ({ data, filters, walletData }) => {

return (
<WalletContainer>
<Wallet>
<Wallet
onClick={() => {
updateMoreInfo(wallet.key)
trackCustomEvent({
eventCategory: "WalletMoreInfo",
eventAction: `More info wallet`,
eventName: `More info ${wallet.name}`,
})
}}
>
<td>
<FlexInfo>
<div>
Expand Down Expand Up @@ -839,16 +849,7 @@ const WalletTable = ({ data, filters, walletData }) => {
</FlexInfo>
</td>
<td>
<FlexInfoCenter
onClick={() => {
updateMoreInfo(wallet.key)
trackCustomEvent({
eventCategory: "WalletMoreInfo",
eventAction: `More info wallet`,
eventName: `More info ${wallet.name}`,
})
}}
>
<FlexInfoCenter>
{wallet[firstFeatureSelect.filterKey!] ? (
<GreenCheck />
) : (
Expand All @@ -857,16 +858,7 @@ const WalletTable = ({ data, filters, walletData }) => {
</FlexInfoCenter>
</td>
<td>
<FlexInfoCenter
onClick={() => {
updateMoreInfo(wallet.key)
trackCustomEvent({
eventCategory: "WalletMoreInfo",
eventAction: `More info wallet`,
eventName: `More info ${wallet.name}`,
})
}}
>
<FlexInfoCenter>
{wallet[secondFeatureSelect.filterKey!] ? (
<GreenCheck />
) : (
Expand All @@ -875,16 +867,7 @@ const WalletTable = ({ data, filters, walletData }) => {
</FlexInfoCenter>
</td>
<td>
<FlexInfoCenter
onClick={() => {
updateMoreInfo(wallet.key)
trackCustomEvent({
eventCategory: "WalletMoreInfo",
eventAction: `More info wallet`,
eventName: `More info ${wallet.name}`,
})
}}
>
<FlexInfoCenter>
{wallet[thirdFeatureSelect.filterKey!] ? (
<GreenCheck />
) : (
Expand All @@ -894,17 +877,7 @@ const WalletTable = ({ data, filters, walletData }) => {
</td>
<td>
<FlexInfoCenter>
<div
style={{ cursor: "pointer" }}
onClick={() => {
updateMoreInfo(wallet.key)
trackCustomEvent({
eventCategory: "WalletMoreInfo",
eventAction: `More info wallet`,
eventName: `More info ${wallet.name}`,
})
}}
>
<div>
<WalletMoreInfoArrow
name={wallet.moreInfo ? "chevronUp" : "chevronDown"}
/>
Expand Down
10 changes: 6 additions & 4 deletions src/components/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,12 @@ const Link: React.FC<IProps> = ({
href={to}
target="_blank"
rel="noopener noreferrer"
onClick={() =>
onClick={(e) => {
e.stopPropagation()
trackCustomEvent(
customEventOptions ? customEventOptions : eventOptions
)
}
}}
aria-label={ariaLabel}
>
{children}
Expand All @@ -157,11 +158,12 @@ const Link: React.FC<IProps> = ({
href={to}
target="_blank"
rel="noopener noreferrer"
onClick={() =>
onClick={(e) => {
e.stopPropagation()
trackCustomEvent(
customEventOptions ? customEventOptions : eventOptions
)
}
}}
aria-label={ariaLabel}
>
{children}
Expand Down

0 comments on commit f75d8d8

Please sign in to comment.