How do I replace these two functions with a bool argument here?

I’m trying to figure out how to add a bool argument to my code here instead of having both the enableButton and disableButton functions here.

//enable button function
private void enableButton (string x)
{
    timerButton.interactable = true;
    timeLabel.text = x;
}

//disable button function
private void disableButton(string x)
{
    timerButton.interactable = false;
    timeLabel.text = x;
}
private void configureButton(string x, bool interactable)
{
    timerButton.interactable = interactable;
    timeLabel.text = x;
}
1 Like

Thank you!