Home > database >  React Bootstrap ButtonToolbar Not Spacing Buttons Apart
React Bootstrap ButtonToolbar Not Spacing Buttons Apart

Time:09-17

I'm having a problem keeping two buttons apart using the ButtonToolbar component in react-bootstrap. I would like these two buttons to be spaced apart, but I'm not sure what I need to do with the styling. According to the enter image description here

          <ButtonToolbar style={{ marginTop: "17.5px" , }}>
            <Button
              size="sm"
              onClick={() => {
                setUndoPlayToggle(!undoPlayToggle);
                setPauseVariable(true);
              }}
              disabled={pitchStateLogs.length === 0}
            >
              Undo Play
            </Button>
            <Button size="sm">View Stats</Button>
          </ButtonToolbar>

CodePudding user response:

You would simply add a class margin (mr-2) to the left button:

Or pick any Edit React bootstrap demo (forked)

  • Related