BackButton
Click to navigate to previous page
BackButton
import BackButton from "@intility/bifrost-react/BackButton";BackButton
Go to top
Basic BackButton
BackButton should be placed directly above the page title, and in the same area on every page.
By default, it will trigger history.back() and display english 'Back' text.
See breadcrumbs for more flexibility and multiple levels.
<BackButton />
Custom text
Bifrost ships with English, Norwegian, and Swedish locale, which you can toggle through the <Bifrost> component, or you can set a custom text directly:
<BackButton text="Get me out of here!" />
Routing library
If you are using a routing library, you can use its method of manipulating history
instead of the native browser window.history.back(), by overriding onClick.
<BackButton onClick={() => { // do something (default is `() => window.history.back()`) }} />