{"_id":"@cafercangundogdu/frameless-titlebar","_rev":"2-4726eb0cc61f13830aa924cdfb9c583f","name":"@cafercangundogdu/frameless-titlebar","dist-tags":{"latest":"2.4.2"},"versions":{"2.4.0":{"name":"@cafercangundogdu/frameless-titlebar","version":"2.4.0","description":"Customizable titlebar for frameless Electron desktop applications","author":{"name":"Cafer Can Gündoğdu"},"license":"MIT","private":false,"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/cafercangundogdu/frameless-titlebar.git"},"main":"dist/cjs/index.js","module":"dist/cjs/index.js","jsnext:main":"dist/cjs/index.js","engines":{"node":">=8","npm":">=5"},"scripts":{"build":"yarn clean && yarn build:esm && yarn build:cjs","build:esm":"tsc","build:cjs":"tsc --module commonjs --outDir dist/cjs","postbuild":"yarn copy-files:esm && yarn copy-files:cjs","copy-files:esm":"copyfiles -u 1 src/**/*.html src/**/*.css dist/esm/","copy-files:cjs":"copyfiles -u 1 src/**/*.html src/**/*.css dist/cjs/","clean":"rimraf dist/","prepare":"npm run build","lint":"eslint \"{**/*,*}.{js,ts,jsx,tsx}\"","prettier":"prettier --write \"{src,tests,example/src}/**/*.{js,ts,jsx,tsx}\"","npm:publish":"npm publish --dry-run"},"peerDependencies":{"react":">=18"},"dependencies":{"classnames":"^2.3.2","deepmerge":"^4.2.2"},"devDependencies":{"@types/node":"^18.7.18","@types/react":"^18.0.20","@typescript-eslint/eslint-plugin":"^5.38.0","@typescript-eslint/parser":"^5.38.0","copyfiles":"^2.4.1","eslint":"^8.23.1","eslint-config-prettier":"^8.5.0","eslint-config-react-app":"^7.0.1","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.31.8","eslint-plugin-react-hooks":"^4.6.0","prettier":"^2.7.1","react":"^18.2.0","react-dom":"^18.2.0","rimraf":"^3.0.2","typescript":"^4.8.3","typescript-plugin-css-modules":"^3.4.0"},"licenseText":"MIT License\n\nCopyright (c) 2019 Cristian Ponce\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@cafercangundogdu/frameless-titlebar@2.4.0","dist":{"shasum":"8df51d29e1ef9a042af6f43ff95b8df63a4fd2cc","integrity":"sha512-v1quljUT2W/sq4OAOAdtDODOTmindOXWKFfWjxIX+Xm1fXHGgUw9YgC0IDLcTItDK5q53mGo434N3JOOp4EGkg==","tarball":"https://registry.npmjs.org/@cafercangundogdu/frameless-titlebar/-/frameless-titlebar-2.4.0.tgz","fileCount":235,"unpackedSize":357745,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwoX9Cnk+ot27nt2VsU8V9bVWitA1xhQ6FWBxqSnBRmgIgXve9kSse1/gSb1HwHTAZr3zfu5r1hi+5AkBMNonytJc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLZ/XACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpQyA/9GU3y9TSlmWhtI0eMqukSq860km9aX4hA2K4AZ4WTDNEfXkJZ\r\ndgilL/hTJbbRmnoWx4Sztm2h4qa9owADbhuriRCmUs/DG6oNRVgKMaSfq66x\r\nGvsJgeSTCPsrVhO5RzpAhYWmJW7msJZzuIeYuzwfzwJJkCAbmtst4cbbiR3D\r\nFU2NlfG74nYy7NFqTSPhwDthO5rTXmVFTmRc9aENuzJ9Qx1T4yhTDHq97dbv\r\nB2CsMYfBLbVBW1qkND4ehzBtuqr8X1UH0b2MisFRxU22FMNfYN/KZU7k3e5+\r\n8TWhUfr06y2H9c25vfBeiMTFZrLzxMOKckFiHjh7HX9PjLDPiswh9BKIbzJi\r\nYj7jsr6co3cyDXrPOUXrlMKL14+WYqY73WNKYC7a0U7eUMiNocpsNMTZMzXx\r\nDkEpodGUuZFsANMC9QxSjUD1WJsr0wW9lvp7vXkwzNrk42IY7d0JOzS9zg57\r\n1NG7tpS8E8LtTrFRgHpvjpfhBIMt9LjVO0QQ2+4kENn/Ffyi3kEk3GZEY17T\r\nGIOshvdzhvli1UFYD1LdBQ1LdrOgf014NnM8opE0zHyaweFTZNOmgT1KSxdN\r\nOA9GiIAl1Sii6dzWar7KSlz40RszaeVPnD7IPQvcmK0tnad6vvgpk7o9IXYF\r\n6LrNZqWRo1efrmpk5LmIRh9I31HPA061Soo=\r\n=Rb6x\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"},"directories":{},"maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/frameless-titlebar_2.4.0_1663934423154_0.282706923158643"},"_hasShrinkwrap":false},"2.4.1":{"name":"@cafercangundogdu/frameless-titlebar","version":"2.4.1","description":"Customizable titlebar for frameless Electron desktop applications","author":{"name":"Cafer Can Gündoğdu"},"license":"MIT","private":false,"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/cafercangundogdu/frameless-titlebar.git"},"main":"dist/cjs/index.js","module":"dist/cjs/index.js","jsnext:main":"dist/cjs/index.js","engines":{"node":">=8","npm":">=5"},"scripts":{"build":"yarn clean && yarn build:esm && yarn build:cjs","build:esm":"tsc","build:cjs":"tsc --module commonjs --outDir dist/cjs","postbuild":"yarn copy-files:esm && yarn copy-files:cjs","copy-files:esm":"copyfiles -u 1 src/**/*.html src/**/*.css dist/esm/","copy-files:cjs":"copyfiles -u 1 src/**/*.html src/**/*.css dist/cjs/","clean":"rimraf dist/","prepare":"npm run build","lint":"eslint \"{**/*,*}.{js,ts,jsx,tsx}\"","prettier":"prettier --write \"{src,tests,example/src}/**/*.{js,ts,jsx,tsx}\"","npm:publish":"npm publish --dry-run"},"peerDependencies":{"react":">=18"},"dependencies":{"classnames":"^2.3.2","deepmerge":"^4.2.2"},"devDependencies":{"@types/node":"^18.7.18","@types/react":"^18.0.20","@typescript-eslint/eslint-plugin":"^5.38.0","@typescript-eslint/parser":"^5.38.0","copyfiles":"^2.4.1","eslint":"^8.23.1","eslint-config-prettier":"^8.5.0","eslint-config-react-app":"^7.0.1","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.31.8","eslint-plugin-react-hooks":"^4.6.0","prettier":"^2.7.1","react":"^18.2.0","react-dom":"^18.2.0","rimraf":"^3.0.2","typescript":"^4.8.3","typescript-plugin-css-modules":"^3.4.0"},"licenseText":"MIT License\n\nCopyright (c) 2019 Cristian Ponce\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@cafercangundogdu/frameless-titlebar@2.4.1","dist":{"shasum":"7867a42b2fa568c09bfcd63c775a6b114fded99c","integrity":"sha512-adb4MyGOyDGjPnWW9Zji+vF0qTIj2Knrjxt16qAmHkTH0A2fC8cyJOZsucJZiG1ax/c/calEhU3OAqywhbNGqA==","tarball":"https://registry.npmjs.org/@cafercangundogdu/frameless-titlebar/-/frameless-titlebar-2.4.1.tgz","fileCount":235,"unpackedSize":357745,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID6zk+EhQnzWdD6wpQwx9OWJ02Hvg/6OoBAAvJAWoiwkAiEA0M1gmBF9xeaCT8wWMuJ0WqhfUMGh6TWz1LXSncSOLJ8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLaR1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBAA//fB3Ex36PLh6rUPipBv8XZ83Vyi23We2clOCqbe3pRmah/ZJO\r\n5DGEDckWFQ0erxbp5o6Npd1u6x5lXW1geli77DbWBvHux3JTGgMNM0XLjfTF\r\n6KJknoqruBO/ZJybyQ1Wvc8GcFlBP2isNVuC7ba8tOExRI2ifnWuheLc7Xlj\r\nf/9cE7YLibJLrkOnAVwNoBPHxx+Kqq6+zBfHOnvvTjG64ahsOWry0j3DmZyL\r\n/nejCTcWExzv9/HJVRWmSjG2CfkWGwN/Q1cxQWYJW3vloXWghBR8H4zpbaB2\r\nODIjBO7tAnISLmKwyqfiB0Zx00uz3TBXqGN5mzw+btWB4+8/5mOG1k7JsspK\r\nzIl8eniGE+pJrcU2Pnrj9kssEbbqO94qJxUMRMZ0YILagTDiO5H7B//dl2/o\r\nOeY/kkEQrcBTC2IJvhXFe1jsad2Xrjizm342QFtzijMhYhoZnZv4WODwvow1\r\ne+g199xgZfEc2EU4NFHX/iZsEI/rI2O7LVLDcUS2UEF8Ot9RZ/252NpRB7xw\r\nfkVzUkDo5pb8jrje4ZTwnaItowXJPFhXB3vdNoQZUo09pnj8Qw+4Dkkyuzku\r\ne5c9HTnznfhKSmq9buTKkjuUAE/kpxA5xYy0F1S497QXteF+qKxgNPRduYXE\r\n/RcePng+ASqtXLR9kKl4y5yffDN3/y+/l/o=\r\n=BYfp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"},"directories":{},"maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/frameless-titlebar_2.4.1_1663935605662_0.37733515930644956"},"_hasShrinkwrap":false},"2.4.2":{"name":"@cafercangundogdu/frameless-titlebar","version":"2.4.2","description":"Customizable titlebar for frameless Electron desktop applications","author":{"name":"Cafer Can Gündoğdu"},"license":"MIT","private":false,"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/cafercangundogdu/frameless-titlebar.git"},"main":"dist/cjs/index.js","module":"dist/cjs/index.js","jsnext:main":"dist/cjs/index.js","engines":{"node":">=8","npm":">=5"},"scripts":{"build":"yarn clean && yarn build:esm && yarn build:cjs","build:esm":"tsc","build:cjs":"tsc --module commonjs --outDir dist/cjs","postbuild":"yarn copy-files:esm && yarn copy-files:cjs","copy-files:esm":"copyfiles -u 1 src/**/*.html src/**/*.css dist/esm/","copy-files:cjs":"copyfiles -u 1 src/**/*.html src/**/*.css dist/cjs/","clean":"rimraf dist/","prepare":"npm run build","lint":"eslint \"{**/*,*}.{js,ts,jsx,tsx}\"","prettier":"prettier --write \"{src,tests,example/src}/**/*.{js,ts,jsx,tsx}\"","npm:publish":"npm publish --dry-run"},"peerDependencies":{"react":">=18"},"dependencies":{"classnames":"^2.3.2","deepmerge":"^4.2.2"},"devDependencies":{"@types/node":"^18.7.18","@types/react":"^18.0.20","@typescript-eslint/eslint-plugin":"^5.38.0","@typescript-eslint/parser":"^5.38.0","copyfiles":"^2.4.1","eslint":"^8.23.1","eslint-config-prettier":"^8.5.0","eslint-config-react-app":"^7.0.1","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.31.8","eslint-plugin-react-hooks":"^4.6.0","prettier":"^2.7.1","react":"^18.2.0","react-dom":"^18.2.0","rimraf":"^3.0.2","typescript":"^4.8.3","typescript-plugin-css-modules":"^3.4.0"},"licenseText":"MIT License\n\nCopyright (c) 2019 Cristian Ponce\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@cafercangundogdu/frameless-titlebar@2.4.2","dist":{"shasum":"76279d82601f04322506c1b2c0f8834255139788","integrity":"sha512-qUg2dP82yBPuIn54w7nlGd6n2KIZ/x9BkPZBb8SSYgev9GbjEB6qnkqGUX/rCDT4D0BVpu1zlEessyCQxu8WIQ==","tarball":"https://registry.npmjs.org/@cafercangundogdu/frameless-titlebar/-/frameless-titlebar-2.4.2.tgz","fileCount":235,"unpackedSize":357929,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8tW8TarFuXo8c1zxNAzNRtJn9ZP8Hcq2CCb9IRs1meQIgfFjOCeEHXAGo11aHesKdb53ROlPQz1RyF7TYvZJ36MQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLamoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhUw/9FAN9ri+SXdjnEyagvH9IdEhzUgC6i7Ouo7rOoBCHz0VYIvjV\r\ncfuYXcJL7R2NpDfY4orOr/3lSb6WZjlsbdx0apNr7rJIbQRhoxcyiVvdSm/G\r\n50bJ6OwGHo9d0HjBhrTemhL4bYPrjyfKNWdvascV59KBwV2wDkdVVbHFdaXP\r\nmqhgtspj1IDtSHH6uRWUIA2Em6rfCh+InaXf9ULbNxvtX1BzbxmxYh2Un0A1\r\n5ONdmwGM2gFk0pL7/L3nsvD7J1q6ws52vJrMQAAjWDzG5mziPiwrB0PddtUt\r\nBuIKd4lb47Z8HI2YsIT/kW1Nnj1ZPBKIKcwBGTDnrmvxoMo5ZUcuJ41KgKZ3\r\nzza09LLosbP2S5bLBg+UaqGlbU4NcFKQX6HEHpTTTMTFT8afWwZQiQF9bqvP\r\n6IA3kTifzwQEIwHnRnqOU4mr7OHhG145jAS8O6AJQ2ep9feO+MLt7/YVrJ48\r\n9acrG0OSXckCgFsDRkHOk6cMFW7wh4yd02T/Yykii7QS6Z08IefJNmtZqd1j\r\nnDJLsSkfIYEAI7Y+pY3EfsltbvQzXqCbSYeq4QrY99QG2wtDCi0V32HIrENo\r\nm4yL+nvU0w2E6ArpLEQABVTSVpch1VyUzzzAUWOl4y45ESXFeactugunftxP\r\n1usWn9yQClwMYXcNwva3IZgQ4H7LAA1BJZ8=\r\n=RMAI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"},"directories":{},"maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/frameless-titlebar_2.4.2_1663936936194_0.5284919747763861"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-23T12:00:23.076Z","2.4.0":"2022-09-23T12:00:23.630Z","modified":"2022-09-23T12:42:16.482Z","2.4.1":"2022-09-23T12:20:05.852Z","2.4.2":"2022-09-23T12:42:16.407Z"},"maintainers":[{"name":"cafercangundogdu","email":"cafercangundogdu@gmail.com"}],"description":"Customizable titlebar for frameless Electron desktop applications","repository":{"type":"git","url":"git+https://github.com/cafercangundogdu/frameless-titlebar.git"},"author":{"name":"Cafer Can Gündoğdu"},"license":"MIT","readme":"# @cafercangundogdu/frameless-titlebar\n\n[![NPM](https://img.shields.io/npm/v/@cafercangundogdu/frameless-titlebar.svg)](https://www.npmjs.com/package/@cafercangundogdu/frameless-titlebar) ![Build and Deploy](https://github.com/cafercangundogdu/frameless-titlebar/workflows/Build%20and%20Deploy/badge.svg) ![NPM](https://img.shields.io/npm/l/frameless-titlebar)\n\n> Customizable titlebar for frameless electron windows built with React\n\n![Main][main]\n\n## [Demo App](https://cafercangundogdu.github.io/frameless-titlebar)\n\nThe demo application can be found in the [example](./example) folder along with more images of the different titlebar styles:\n\n- [Overflow Menu](./example/public/overflow.jpg): When menu buttons don't fit in the given titlebar space items are moved into an overflowed submenu.\n- [Stacked Menu](./example/public/stacked.png): Titlebar stacked above menu bar.\n- [Vertical Menu](./example/public/vertical.png): All menu items moved into a vertical submenu.\n\n## Install\n\n```bash\nnpm install --save @cafercangundogdu/frameless-titlebar\n# or\nyarn add @cafercangundogdu/frameless-titlebar\n```\n\n## Usage\n\nElectron Browser SetUp\n\n```js\nmainWindow = new BrowserWindow({\n  width: 1024,\n  height: 728,\n  minWidth: 600, // set a min width!\n  minHeight: 300, // and a min height!\n  // Remove the window frame from windows applications\n  frame: false,\n  // Hide the titlebar from MacOS applications while keeping the stop lights\n  titleBarStyle: 'hidden',\n})\n```\n\nReact App SetUp\n\n```jsx\nimport React from 'react'\nimport icon from 'path/to/icon.png'\nimport menu from 'path/to/menu'\nimport { remote } from 'electron'\n\nimport TitleBar from '@cafercangundogdu/frameless-titlebar'\n\nconst currentWindow = remote.getCurrentWindow()\n\nconst Example = () => {\n  // manage window state, default to currentWindow maximized state\n  const [maximized, setMaximized] = useState(currentWindow.isMaximized())\n  // add window listeners for currentWindow\n  useEffect(() => {\n    const onMaximized = () => setMaximized(true)\n    const onRestore = () => setMaximized(false)\n    currentWindow.on('maximize', onMaximized)\n    currentWindow.on('unmaximize', onRestore)\n    return () => {\n      currentWindow.removeListener('maximize', onMaximized)\n      currentWindow.removeListener('unmaximize', onRestore)\n    }\n  }, [])\n\n  // used by double click on the titlebar\n  // and by the maximize control button\n  const handleMaximize = () => {\n    if (maximized) {\n      currentWindow.restore()\n    } else {\n      currentWindow.maximize()\n    }\n  }\n\n  return (\n    <div>\n      <TitleBar\n        iconSrc={icon} // app icon\n        currentWindow={currentWindow} // electron window instance\n        platform={process.platform} // win32, darwin, linux\n        menu={menu}\n        theme={\n          {\n            // any theme overrides specific\n            // to your application :)\n          }\n        }\n        title='frameless app'\n        onClose={() => currentWindow.close()}\n        onMinimize={() => currentWindow.minimize()}\n        onMaximize={handleMaximize}\n        // when the titlebar is double clicked\n        onDoubleClick={handleMaximize}\n        // hide minimize windows control\n        disableMinimize={false}\n        // hide maximize windows control\n        disableMaximize={false}\n        // is the current window maximized?\n        maximized={maximized}\n      >\n        {/* custom titlebar items */}\n      </TitleBar>\n    </div>\n  )\n}\n```\n\n> Example of all of the overridable theme properties can be found in the example folder [here](./example/README.md)\n\nUse titlebar theme in children\n\n```jsx\nimport { useContext } from 'react';\nimport { TitlebarThemeContext } from '@cafercangundogdu/frameless-titlebar';\n\nconst CustomItem = () => {\n  // access all of the current theme properties in this\n  // child component\n  const theme = useContext(TitlebarThemeContext);\n  return (\n    <div style={{ height: theme.bar.height }}>\n      {/* ... */}\n    </div>\n  )\n}\n\nconst App = () => {\n  return (\n    <div>\n      <TitleBar>\n        <CustomItem>\n      </TitleBar>\n    </div>\n  )\n}\n\n```\n\n> Example of a custom TitleBarButton can be seen [here](./example/src/components.js)\n\n## Supported Menu Item Properties\n\nSupported menu item properties from:\n[Electron Menu Object/Template Documentation](https://electronjs.org/docs/api/menu 'Electron Menu Documentation')\n\n| Name                     |                              Type                              | Description                                                                                                                                    |\n| :----------------------- | :------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` (optional)          |                            `string`                            | Must be unique. If defined then it can be used as a reference to this item by the position attribute                                           |\n| `type` (optional)        | oneOf([`normal`, `separator`, `submenu`, `checkbox`, `radio`]) | Type of supported menu items                                                                                                                   |\n| `label` (optional)       |                            `string`                            | Menu item label                                                                                                                                |\n| `click` (optional)       |           `function(menuItem, browserWindow, event)`           | if `currentWindow` is not passed in to the titlebar then, `browserWindow` will be null                                                         |\n| `disabled` (optional)    |                             `bool`                             | Enables/disables menu item from being clicked on                                                                                               |\n| `accelerator` (optional) |                            `string`                            | Accelerator string eg `CmdOrCtrl+Z`                                                                                                            |\n| `icon` (optional)        |                             `img`                              | The image shown to the left of the menu label                                                                                                  |\n| `checked` (optional)     |                             `bool`                             | Should only be specified for checkbox or radio type menu items                                                                                 |\n| `submenu` (optional)     |                     `array : [MenuItems]`                      | Array of menu items. If `submenu` is specified, the `type: 'submenu'` can be omitted.                                                          |\n| `before` (optional)      |                            `string`                            | Inserts this item before the item with the specified id. If the referenced item doesn't exist the item will be inserted at the end of the menu |\n| `after` (optional)       |                            `string`                            | Inserts this item after the item with the specified id. If the referenced item doesn't exist the item will be inserted at the end of the menu  |\n\n## Keyboard accessibility\n\n**Opening Menu**: Pressing `Alt` Key + First letter of any of the visible menu items. eg: `Alt+F` would open the first menu item with an `F` if any, such as `File`.\n\n**Closing Menu**: Pressing `Esc`.\n\n**Navigating Submenus**: Use arrow keys (up, down, left, right) to navigate menus once they're open.\n\n## Disclaimers\n\n**NOTE**: `^v2.0.0` has a lot of breaking changes from the previous `^1.x.x` releases since this was a complete re-write of frameless-titlebar\n\n## Contributing\n\nFeel free to fork and create pull requests! I'll try my best to review any code changes for the next release.\n\n## Links\n\n[Electron Remote Docs](https://www.electronjs.org/docs/api/remote#remotegetcurrentwindow)\n\n[Electron Menu Docs](https://electronjs.org/docs/api/menu 'Electron Menu Documentation')\n\n## License\n\nMIT © [Cristian006](https://github.com/Cristian006)\n\n---\n\n<div style=\"text-align: center\">\nMade with ❤️ + ☕ by <a href=\"http://crispcrafts.com\">Cristian Ponce</a>\n</div>\n\n[main]: ./example/public/default.png 'Main'\n","readmeFilename":"README.md"}