Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dracula-theme-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@gitroll/profile-card": patch
---

Added Dracula theme
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Available Themes

We now have 9 preset themes to choose from! 🎉
We now have 10 preset themes to choose from! 🎉

- **`light`** (default)
- **`dark`**
Expand All @@ -17,6 +17,7 @@ We now have 9 preset themes to choose from! 🎉
- **`kawaiiCat`**
- **`retro`**
- **`darkEmerald`**
- **`dracula`**

To use a preset theme, simply add the `theme` query parameter to the image URL. For example:

Expand Down
7 changes: 7 additions & 0 deletions src/OGCard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,10 @@ export const Midnight: Story = {
}
}

export const Dracula: Story = {
args: {
...baseProps,
theme: preset.dracula,
},
}

30 changes: 29 additions & 1 deletion src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,33 @@ const darkEmerald = {
avatarPlaceholderColor: '#9ca3af',
logoColor: '#00bc7d',
}

const dracula = {
backgroundColor: '#282A36',
textColor: '#F8F8F2',
textColorSecondary: '#6272A4',
badgeColors: {
[Rating.S]: '#BD93F9',
[Rating.A]: '#50FA7B',
[Rating.B]: '#F1FA8C',
[Rating.C]: '#FFB86C',
[Rating.D]: '#FF79C6',
[Rating.E]: '#FF5555',
},
badgeTextColors: {
[Rating.S]: '#282A36',
[Rating.A]: '#282A36',
[Rating.B]: '#282A36',
[Rating.C]: '#282A36',
[Rating.D]: '#282A36',
[Rating.E]: '#282A36',
},
barBackground: '#44475A',
barForeground: '#8BE9FD',
borderColor: '#44475A',
avatarPlaceholderColor: '#6272A4',
logoColor: '#F8F8F2',
}
export const preset: Record<string, Theme> = {
light,
dark,
Expand All @@ -320,5 +347,6 @@ export const preset: Record<string, Theme> = {
midnight,
kawaiiCat,
retro,
darkEmerald
darkEmerald,
dracula
}