UNPKG

@shopify/app-bridge-host

Version:

App Bridge Host contains components and middleware to be consumed by the app's host, as well as the host itself. The middleware and `Frame` component are responsible for facilitating communication between the client and host, and used to act on actions se

26 lines (23 loc) 625 B
import { Group, Pos } from '@shopify/app-bridge-core/actions'; /** * Returns update user action payload * @public */ function setUser(user) { return { group: Group.Pos, type: Pos.Action.USER_UPDATE, payload: user }; } /** * Returns update location action payload * @public */ function setLocation(location) { return { group: Group.Pos, type: Pos.Action.LOCATION_UPDATE, payload: location }; } /** * Returns update device action payload * @public */ function setDevice(device) { return { group: Group.Pos, type: Pos.Action.DEVICE_UPDATE, payload: device }; } export { setDevice, setLocation, setUser };