@contentstech/stackflow-plugin-basic-ui
v0.6.0
Published
Render the UI within the activity using the global stack state. It provides `cupertino` and `android` themes by default.
Downloads
829
Readme
@stackflow/plugin-basic-ui
Render the UI within the activity using the global stack state. It provides cupertino
and android
themes by default.
Usage
/**
* stackflow.ts
*/
import { stackflow } from "@stackflow/react";
import { basicUIPlugin } from "@stackflow/plugin-basic-ui";
const { Stack, useFlow } = stackflow({
// ...
plugins: [
// ...
basicUIPlugin({
theme: "cupertino",
}),
],
});
import { AppScreen } from "@stackflow/plugin-basic-ui";
const Something: React.FC = () => {
return (
<AppScreen appBar={{ title: "Home" }}>
<div>Hello, World</div>
</AppScreen>
);
};
import { Modal } from "@stackflow/plugin-basic-ui";
const Something: React.FC = () => {
return (
<Modal>
<div>Hello, World</div>
</Modal>
);
};
import { BottomSheet } from "@stackflow/plugin-basic-ui";
const Something = () => {
return (
<BottomSheet>
<div>Hello, World</div>
</BottomSheet>
);
};