button example
This commit is contained in:
25
README.md
25
README.md
@@ -7,14 +7,27 @@ Configure persistent floating tab for login/logout:
|
||||
|
||||
```javascript
|
||||
await NOSTR_LOGIN_LITE.init({
|
||||
// Set the initial theme (default: 'default')
|
||||
theme: 'dark', // Choose from 'default' or 'dark'
|
||||
|
||||
// Standard configuration options
|
||||
methods: {
|
||||
extension: true,
|
||||
local: true,
|
||||
readonly: true,
|
||||
connect: true,
|
||||
otp: true
|
||||
},
|
||||
|
||||
// Floating tab configuration (now uses theme-aware text icons)
|
||||
floatingTab: {
|
||||
enabled: true,
|
||||
hPosition: 0.95, // 0.0-1.0 or '95%' from left
|
||||
vPosition: 0.5, // 0.0-1.0 or '50%' from top
|
||||
appearance: {
|
||||
style: 'pill', // 'pill', 'square', 'circle', 'minimal'
|
||||
theme: 'auto', // 'auto', 'light', 'dark'
|
||||
icon: '🔐',
|
||||
theme: 'auto', // 'auto' follows main theme
|
||||
icon: '[LOGIN]', // Now uses text-based icons like [LOGIN], [KEY], [NET]
|
||||
text: 'Login'
|
||||
},
|
||||
behavior: {
|
||||
@@ -27,6 +40,14 @@ await NOSTR_LOGIN_LITE.init({
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// After initialization, you can switch themes dynamically:
|
||||
NOSTR_LOGIN_LITE.switchTheme('dark');
|
||||
NOSTR_LOGIN_LITE.switchTheme('default');
|
||||
|
||||
// Or customize individual theme variables:
|
||||
NOSTR_LOGIN_LITE.setThemeVariable('--nl-accent-color', '#00ff00');
|
||||
|
||||
```
|
||||
|
||||
Control methods:
|
||||
|
||||
Reference in New Issue
Block a user