I a trying to add a line break after a button that is generated in a react loop. I’ve tried adding elements but that has not worked:
JavaScript
x
17
17
1
<div className="connect-container">
2
<div>
3
{connectors.map((connector) => (
4
<button className="metamask-button"
5
disabled={!connector.ready}
6
key={connector.id}
7
onClick={() => connect(connector)}
8
>
9
{connector.name}
10
{!connector.ready && ' (unsupported)'}
11
{isConnecting &&
12
connector.id === pendingConnector?.id &&
13
' > > >'}
14
</button>
15
)) }
16
</div>
17
There should be a space between the buttons. Currently they are stacked without spacing.
Advertisement
Answer
This approach worked, but only by adding margin-bottom:
JavaScript
1
7
1
.connect-container button {
2
display: block;
3
width: 100%;
4
float: none;
5
margin-bottom: 10px;
6
}
7