@contentstech/stackflow-plugin-basic-ui
TypeScript icon, indicating that this package has built-in type declarations

0.6.0 • Public • Published

@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>
  );
};

Readme

Keywords

none

Package Sidebar

Install

npm i @contentstech/stackflow-plugin-basic-ui

Weekly Downloads

6

Version

0.6.0

License

MIT

Unpacked Size

1.39 MB

Total Files

161

Last publish

Collaborators

  • xiniha