-
Notifications
You must be signed in to change notification settings - Fork 0
PUIToast
Elijah Cobb edited this page May 13, 2021
·
3 revisions
A toast is a small pop-up that displays information to the user. Supply a message and type using the PUIHookToast hook. If you supply a duration the toast will leave the screen after the specified amount of seconds. If you don't supply a duration, the toast will stay on the screen for 6 seconds.
import {PUIStatus, usePUIToast} from "./pstdl-ui";
import {ReactElement} from "react";
export function TestBed(): ReactElement {
const toast = usePUIToast();
return <div className={"TestBed"}>
<button onClick={() => {
toast({msg: "Hello, pstdl-ui!", type: PUIStatus.SUCCESS, duration: 3})
}}>Show Toast!</button>
</div>
}
Created by Elijah Cobb at the Planetary Surface Technology Development Lab located at Michigan Technological University
- PUIGage
- PUIImmutableBinaryStatus
- PUIImmutableNumericStatus
- PUILog
- PUIMutableBinaryStatus
- PUIMutableNumericStatus
- PUIPicker
- PUISegmentedPicker
- PUIAlert
- PUIToast
- PUICard
- PUITopBar
- PUIAppController
- PUIKeyboardController
- PUIGamepadController
- PUIHookAlert
- PUIHookLog
- PUIHookState
- PUIHookToast
- PUIApp
- PUIColor
- PUIContext