readme: document previews
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
24
README.md
24
README.md
@@ -76,8 +76,32 @@ The app should appear on the emulator
|
|||||||
[direnv]: https://direnv.net/
|
[direnv]: https://direnv.net/
|
||||||
[nix]: https://nixos.org/download/
|
[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
|
## Contributing
|
||||||
|
|
||||||
Configure the developer environment:
|
Configure the developer environment:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./scripts/dev_setup.sh
|
./scripts/dev_setup.sh
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user