Skip to content

Commit ff920ab

Browse files
committed
Reuse CSS from nav.module.css
1 parent 56905df commit ff920ab

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

wallets/client/components/form/index.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { useCallback, useMemo } from 'react'
2-
import { InputGroup } from 'react-bootstrap'
2+
import { InputGroup, Nav } from 'react-bootstrap'
33
import classNames from 'classnames'
44
import styles from '@/styles/wallet.module.css'
5+
import navStyles from '@/styles/nav.module.css'
56
import { Checkbox, Form, Input, PasswordInput, SubmitButton } from '@/components/form'
67
import CancelButton from '@/components/cancel-button'
78
import Text from '@/components/text'
@@ -70,19 +71,19 @@ function WalletProtocolSelector () {
7071
const [protocol, selectProtocol] = useProtocol()
7172

7273
return (
73-
<div className='d-flex gap-2 pointer'>
74+
<Nav className={navStyles.nav} activeKey={protocol?.name}>
7475
{
75-
protocols.map(p => (
76-
<div
77-
key={p.id}
78-
className={classNames('flex-grow-1 mb-3 text-nowrap', { 'fw-bold border-bottom border-primary border-3': p.name === protocol?.name })}
79-
onClick={() => selectProtocol(p)}
80-
>
81-
{protocolDisplayName(p)}
82-
</div>
83-
))
76+
protocols.map(p => {
77+
return (
78+
<Nav.Item key={p.id} onClick={() => selectProtocol(p)}>
79+
<Nav.Link eventKey={p.name}>
80+
{protocolDisplayName(p)}
81+
</Nav.Link>
82+
</Nav.Item>
83+
)
84+
})
8485
}
85-
</div>
86+
</Nav>
8687
)
8788
}
8889

0 commit comments

Comments
 (0)