@ricerobotics/paddy
v0.0.73
Published
Paddy
Downloads
4
Readme
Paddy
Usage
React App - App.js
import React, { useState, useRef } from "react";
import { injectGlobal } from "emotion";
import { Paddy } from "@ricerobotics/paddy";
import PageComponent from "pages/PageComponent";
import GlobalComponent from "components/GlobalComponent";
const customSFX = new UIfx(require("./sounds/custom.aac").default);
injectGlobal`
Global CSS Styles
`;
const App = () => {
const [customState, setCustomState] = useState(null);
const customRef = useRef(null);
return (
<Paddy
pages={{ pageName: <PageComponent /> }}
params={{ customParam: 0 }}
status={{ customStatus: true }}
sfx={{ customSFX }}
states={{ customState, setCustomState }}
refs={{ customRef }}
constants={{ customConstant: "Custom" }}
>
<GlobalComponent />
</Paddy>
);
};
export default App;
Hooks
usePaddy
usePaddyTransition
useAwaitElevatorState
useCallElevator
useCloseLid
useDispatchElevator
useElevatorState
useDispatchRobot
useOpenLid
usePark
useRobotStatus
useSetPosition
UI Components
Actions
AnimatedIconText
Battery
BigIcon
Body
Button
CodePad
CountryCodeSelector
DestinationItem
FlagIcon
Header
Key
LoaderOverlay
LockPad
LockScreen
Modal
Page
PhoneNumberDisplay
PhonePad
Screen
ServiceSelector
Text
API
openLid
closeLid
park
setGoal
cancelGoal
setPosition
sendMessage
elevatorDispatch
elevatorState
elevatorCall,
elevatorOpen,
elevatorClose,
turnstileOpen
getStatus
activateRelay
restoreMotor
sendError
getMapWaypoints
getMapMeta
activateSonar
deactivateSonar
ignoreInflation
setMission
recordVideo
activateDisinfection
deactivateDisinfection
saveData
loadData
planPath
Lift Operators
carWithId
carWithState