From bf7775467d2292386516d04ac5d9dd5063b8fe31 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 19 Apr 2024 22:16:54 -0700 Subject: [PATCH] readme: document previews Signed-off-by: William Casarin --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 53a75151..3a1bb917 100644 --- a/README.md +++ b/README.md @@ -76,8 +76,32 @@ The app should appear on the emulator [direnv]: https://direnv.net/ [nix]: https://nixos.org/download/ +## Previews + +You can preview individual widgets and views by running the preview script: + +```bash +./preview RelayView +./preview ProfilePreview +# ... etc +``` + +When adding new previews you need to implement the Preview trait for your +view/widget and then add it to the `src/ui_preview/main.rs` bin: + +```rust +previews!(runner, name, + RelayView, + AccountLoginView, + ProfilePreview, +); +``` + + ## Contributing + Configure the developer environment: + ```bash ./scripts/dev_setup.sh ```