Button Tittle Chnage

Button 01

              <Buttons
                  title={
                    !editPasswordState ? "Edit Full Password" : "Cancel"
                  }
                  outline
                  onClick={() => {
                    setEditPasswordState(!editPasswordState);
                  }}
                  class="
                    inline-flex 
                    justify-center 
                    py-2 px-4 border 
                    border-transparent 
                    shadow-sm text-sm 
                    font-medium rounded-sm 
                    text-white bg-red-400 
                    hover:bg-red-400 
                    focus:outline-black
                    focus:ring-2 
                    focus:ring-offset-2 
                    focus:ring-white"/>

Button 02

            <button
                onClick={handlePublishProductList}
                className={"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-sm text-white bg-red-400 hover:bg-white hover:text-red-400 hover:border-red-400 focus:text-black focus:border-black"}>
                Publish
            </button>

I need to add button 01

 title={
!editPasswordState ? "Edit Full Password" : "Cancel"
        }

to Button 02 also, how can I do that? (Button one has a self-closing tag and button two has button start and button stop tags)