From a475d8ff6eb7cc5ec80b75f6ef9fda9c5bc4966a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6k=C3=A7e=20Merdun?= Date: Sun, 30 Jul 2023 17:13:35 +0300 Subject: [PATCH] Update README.md --- README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c2f9d36..53ac936 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,12 @@ function MyTitlebar() { } ``` +![](https://github.com/agmmnn/tauri-controls/assets/16024979/7be3dde4-7953-4188-af12-abd4445c0bf9) + When no platform is specified, the current system will be detected and the matching element will be returned. It's a great solution for cross-platform releases. +WindowTitlebar component handles the window controls and dynamically adjusts the control buttons and titlebar content order based on the current operating system. + ```tsx import { WindowTitlebar } from "tauri-controls" @@ -70,23 +74,21 @@ function MyTitlebar() { } ``` -WindowTitlebar component handles the window controls and dynamically adjusts the control buttons and titlebar content order based on the current operating system. - -[![](.github/statics/Frame.png)](https://www.figma.com/file/ms2vbZx5lEGxHqHR8fAfQm/Desktop-Native-Window-Controls?type=design&node-id=4%3A6020&mode=design&t=PIbVTsr8zWmIFsNr-1) +![](https://github.com/agmmnn/tauri-controls/assets/16024979/214677d4-dd70-4e6b-96c3-b9d1a1356f05) -> _If you get the message "Not allowed by scope" in the terminal after a production build (like me), try [this](https://github.com/agmmnn/tauri-controls/issues/1#issuecomment-1653557673)._ +> _If you get the message "Not allowed by scope" in the terminal after a production build, try [this](https://github.com/agmmnn/tauri-controls/issues/1#issuecomment-1653557673)._ ### Options ```ts +// WindowTitlebar: +controlsOrder?: "right" | "left" | "platform" | "system" +windowControlsProps?: WindowControlsProps + // WindowControls: platform?: "windows" | "macos" | "gnome" hide?: boolean hideMethod?: "display" | "visibility" - -// WindowTitlebar: -controlsOrder?: "right" | "left" | "platform" -windowControlsProps?: WindowControls ``` You can also pass additional `props` to elements like `data-tauri-drag-region` for further enhancements. @@ -109,6 +111,8 @@ You can also pass additional `props` to elements like `data-tauri-drag-region` f ![](https://i.imgur.com/hq389kn.png) +[More examples](https://github.com/agmmnn/tauri-controls/blob/master/src/App.tsx). + # To-Do If the library gets some interest, I can gradually add the following features: