This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-js/lib/src/native/navbar.js
2020-01-03 17:05:24 +08:00

29 lines
706 B
JavaScript

import { Panel } from "../ui/panel";
export function navbar(context) {
const entity = context.entity;
let panel = undefined;
if (entity instanceof Panel) {
panel = entity;
}
return {
isHidden: () => {
return context.navbar.isHidden();
},
setHidden: (hidden) => {
return context.navbar.setHidden({
hidden,
});
},
setTitle: (title) => {
return context.navbar.setTitle({
title,
});
},
setBgColor: (color) => {
return context.navbar.setBgColor({
color: color.toModel(),
});
},
};
}