docs: add support for RTL and LTR (#348)

This commit is contained in:
Haytham A. Salama
2023-06-27 13:42:41 +03:00
committed by GitHub
parent 278a1ea93c
commit 91f6103719
4 changed files with 77 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ This module has been developed by [NuxtLabs](https://nuxtlabs.com/) for [Volta](
- Built with [Headless UI](https://headlessui.dev/) and [Tailwind CSS](https://tailwindcss.com/)
- HMR support through Nuxt App Config
- Dark mode support
- Support for LTR and RTL languages
- Keyboard shortcuts
- Bundled icons
- Fully typed

View File

@@ -0,0 +1,68 @@
<script setup>
const page = ref(1)
const items = ref(Array(55))
</script>
<template>
<div class="w-full gap-3">
<div class="flex justify-between w-full mb-2 border-b pb-4">
<div dir="ltr">
<UInput
icon="i-heroicons-magnifying-glass-20-solid"
size="sm"
color="white"
placeholder="Search..."
:trailing="false"
/>
</div>
<div dir="rtl">
<UInput
icon="i-heroicons-magnifying-glass-20-solid"
size="sm"
color="white"
placeholder="ابحث..."
:trailing="false"
/>
</div>
</div>
<div class="flex justify-between w-full mt-4">
<div dir="ltr">
<UPagination
v-model="page"
:total="items.length"
:prev-button="{
icon: 'i-heroicons-arrow-small-left-20-solid',
label: 'Prev',
color: 'gray'
}"
:next-button="{
icon: 'i-heroicons-arrow-small-right-20-solid',
trailing: true,
label: 'Next',
color: 'gray'
}"
/>
</div>
<div dir="rtl">
<UPagination
v-model="page"
:total="items.length"
:prev-button="{
icon: 'i-heroicons-arrow-small-left-20-solid',
label: 'السابق',
color: 'gray'
}"
:next-button="{
icon: 'i-heroicons-arrow-small-right-20-solid',
trailing: true,
label: 'التالي',
color: 'gray'
}"
/>
</div>
</div>
</div>
</template>

View File

@@ -17,6 +17,7 @@ This module has been developed by the [NuxtLabs](https://nuxtlabs.com/) team for
- Built with [Headless UI](https://headlessui.dev/) and [Tailwind CSS](https://tailwindcss.com/)
- HMR support through Nuxt App Config
- Dark mode support
- Support for LTR and RTL languages
- Keyboard shortcuts
- Bundled icons
- Fully typed

View File

@@ -249,3 +249,10 @@ const items = ref(Array(55))
</template>
```
::
### LTR and RTL
::component-example
#default
:l-t-r-and-r-t-l-theme
::