Skip to content

Commit b80f0b6

Browse files
authored
feat: add RTL support to PackagePlaygrounds (#348)
1 parent a7f26a5 commit b80f0b6

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

app/components/PackagePlaygrounds.vue

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ const props = defineProps<{
77
88
// Map provider id to icon class
99
const providerIcons: Record<string, string> = {
10-
'stackblitz': 'i-simple-icons-stackblitz',
11-
'codesandbox': 'i-simple-icons-codesandbox',
12-
'codepen': 'i-simple-icons-codepen',
13-
'replit': 'i-simple-icons-replit',
14-
'gitpod': 'i-simple-icons-gitpod',
15-
'vue-playground': 'i-simple-icons-vuedotjs',
16-
'nuxt-new': 'i-simple-icons-nuxtdotjs',
17-
'vite-new': 'i-simple-icons-vite',
18-
'jsfiddle': 'i-carbon-code',
10+
'stackblitz': 'i-simple-icons:stackblitz',
11+
'codesandbox': 'i-simple-icons:codesandbox',
12+
'codepen': 'i-simple-icons:codepen',
13+
'replit': 'i-simple-icons:replit',
14+
'gitpod': 'i-simple-icons:gitpod',
15+
'vue-playground': 'i-simple-icons:vuedotjs',
16+
'nuxt-new': 'i-simple-icons:nuxtdotjs',
17+
'vite-new': 'i-simple-icons:vite',
18+
'jsfiddle': 'i-carbon:code',
1919
}
2020
2121
// Map provider id to color class
@@ -32,7 +32,7 @@ const providerColors: Record<string, string> = {
3232
}
3333
3434
function getIcon(provider: string): string {
35-
return providerIcons[provider] || 'i-carbon-play'
35+
return providerIcons[provider] || 'i-carbon:play'
3636
}
3737
3838
function getColor(provider: string): string {
@@ -141,13 +141,13 @@ function focusMenuItem(index: number) {
141141
@keydown="handleKeydown"
142142
>
143143
<span class="flex items-center gap-2">
144-
<span class="i-carbon-play w-4 h-4 shrink-0 text-fg-muted" aria-hidden="true" />
144+
<span class="i-carbon:play w-4 h-4 shrink-0 text-fg-muted" aria-hidden="true" />
145145
<span class="text-fg-muted"
146146
>{{ $t('package.playgrounds.choose') }} ({{ links.length }})</span
147147
>
148148
</span>
149149
<span
150-
class="i-carbon-chevron-down w-3 h-3 text-fg-subtle transition-transform duration-200 motion-reduce:transition-none"
150+
class="i-carbon:chevron-down w-3 h-3 text-fg-subtle transition-transform duration-200 motion-reduce:transition-none"
151151
:class="{ 'rotate-180': isOpen }"
152152
aria-hidden="true"
153153
/>
@@ -166,7 +166,7 @@ function focusMenuItem(index: number) {
166166
v-if="isOpen && hasMultipleLinks"
167167
ref="menuRef"
168168
role="menu"
169-
class="absolute top-full left-0 right-0 mt-1 bg-bg-elevated border border-border rounded-lg shadow-lg z-50 py-1 overflow-visible"
169+
class="absolute top-full inset-is-0 inset-ie-0 mt-1 bg-bg-elevated border border-border rounded-lg shadow-lg z-50 py-1 overflow-visible"
170170
@keydown="handleKeydown"
171171
>
172172
<AppTooltip v-for="link in links" :key="link.url" :text="link.providerName" class="block">

0 commit comments

Comments
 (0)