├── .gitignore ├── README.md ├── index.html ├── package.json ├── public └── favicon.ico ├── src ├── assets │ └── svelte.png ├── lib.ts ├── lib │ ├── index.ts │ └── mail-me.svelte └── vite-env.d.ts ├── svelte.config.js ├── tsconfig.json ├── vite.config.js ├── vite.lib.config.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /dist/ 3 | /.vscode/ 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `mail3-me-button` 2 | 3 | `mail3-me-button` provides a simple way to interact with [Mail3 App](https://app.mail3.me). 4 | 5 | ## Usage 6 | 7 | `mail3-me-button` is a [Web Component](https://developer.mozilla.org/en-US/docs/Web/Web_Components), Just like an HTML element, `mail3-me-button` has some built-in attributes: 8 | 9 | * `to(string)`: an email address as the mail receiver; when provided, the widget displays the number of unread messages between this address and the currently logged-in mailbox in Mail3 app, otherwise it displays the number of all unread messages. 10 | * `lite(boolean)`: in lite mode, `mail3-me-button` will be displayed as a circular Icon without text. 11 | * `variant(string)`: Some default style set for `mail3-me-button`, optionally one of `solid`, `outline`, `ghost`, default is `solid` 12 | * `icon_type(string)`: Icon type for Mail3 Icon, optionally one of `black`, `white`, `light`, `solid`, default is `solid` 13 | * `icon_style(string)`: CSS style for Mail3 Icon 14 | 15 | In addition to the above built-in attributes, `mail3-me-button` also supports passing in all the attributes of [the anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a), such as `style`, `target`, etc. 16 | 17 | ### HTML 18 | 19 | [Live demo](https://stackblitz.com/edit/mail3-me?file=index.html) 20 | 21 | After adding the `mail3-me-button` script, you can use it like an HTML element. 22 | 23 | ```html 24 | 25 | 26 |
27 |