chore: Update README for icons usage. (#620)

Fix #619
This commit is contained in:
Jason Lee 2025-02-12 14:04:11 +08:00 committed by GitHub
parent d95cbabcc3
commit ec3d8e50ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,12 +57,19 @@ GPUI and GPUI Component still in development, so we need add dependency by git.
And GPUI Component depends on `gpui` by special version (It keep updated to upstream) for including WebView support.
```toml
gpui = { git = "https://github.com/huacnlee/zed.git", branch = "export-platform-window" }
gpui = { git = "https://github.com/huacnlee/zed.git", branch = "webview" }
gpui-component = { git = "https://github.com/longbridge/gpui-component.git" }
```
More usage can be found in [story](https://github.com/longbridge/gpui-component/tree/main/crates/story) directory.
### Icons
GPUI Component have `Icon` element, but it does not include SVG files by default.
The example is using [Lucide](https://lucide.dev) icons, but you can use any icons you like, just named the svg files like [IconName](https://github.com/longbridge/gpui-component/blob/main/crates/ui/src/icon.rs#L86) defined the path name.
You can add icons that you need in your project.
## Demo
If you want to see the demo, here is a some demo applications.