Skip to content

Commit 9a19ee7

Browse files
authored
Merge pull request #27 from jaulz/fix/configurable-radius
fix: make radius configurable
2 parents 5b2e71f + b178efa commit 9a19ee7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/favicon.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export type Options = {
66
backgroundColor: string
77
color: string
88
indicator: string
9+
radius: number
910
}
1011

1112
type Favicon = HTMLLinkElement
@@ -18,6 +19,7 @@ export const DefaultOptions: Options = {
1819
backgroundColor: '#424242',
1920
color: '#ffffff',
2021
indicator: '!',
22+
radius: 3,
2123
}
2224

2325
// Get all favicons of the page
@@ -209,7 +211,7 @@ const drawBubble = (
209211
const left = size - width
210212
const bottom = 16 * ratio
211213
const right = 16 * ratio
212-
const radius = 3 * ratio
214+
const radius = options.radius * ratio
213215

214216
// Bubble
215217
context.save()

0 commit comments

Comments
 (0)