mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
docs: add support for RTL and LTR (#348)
This commit is contained in:
committed by
GitHub
parent
278a1ea93c
commit
91f6103719
@@ -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
|
||||
|
||||
68
docs/components/content/themes/LTRAndRTLTheme.vue
Normal file
68
docs/components/content/themes/LTRAndRTLTheme.vue
Normal 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>
|
||||
@@ -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
|
||||
|
||||
@@ -249,3 +249,10 @@ const items = ref(Array(55))
|
||||
</template>
|
||||
```
|
||||
::
|
||||
|
||||
### LTR and RTL
|
||||
|
||||
::component-example
|
||||
#default
|
||||
:l-t-r-and-r-t-l-theme
|
||||
::
|
||||
|
||||
Reference in New Issue
Block a user