assisrafael / react-bootstrap-utils

React bootstrap library
MIT License
6 stars 6 forks source link

feat(forms): accept objects as submitLabel and cancelLabel #9

Closed vbarcellos closed 4 years ago

vbarcellos commented 4 years ago

Proposed change on Form propTypes: From submitLabel: PropTypes.string, to submitLabel: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),

Motive would be to allow for submit (and cancel) buttons to be a little more customizable: goal2

Example of an implemented code:

submitLabel={
    <React.Fragment>
        <FontAwesomeIcon icon={faFileExcel} fixedWidth />
            Export
    </React.Fragment>
}
vbarcellos commented 4 years ago

Turn out I can do this using customActions on my form. Closing issue.