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

29 lines
706 B
JavaScript
Raw Normal View History

2020-01-03 14:44:51 +08:00
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(),
});
},
};
}