TwBorders.vue 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <script setup>
  2. import useBorders from '../../hooks/useBorders.js'
  3. const { BorderRadius, BorderWidth, BorderColor, BorderStyle, DivideWidth, DivideColor, DivideStyle, OutlineWidth, OutlineColor, OutlineStyle, OutlineOffset, RingWidth, RingColor, RingOffsetWidth, RingOffsetColor } = useBorders()
  4. </script>
  5. <template>
  6. <view>
  7. <JcDemo v-bind="BorderRadius">
  8. <view class="grid grid-cols-2 gap-4 text-white text-sm text-center font-bold leading-6">
  9. <view class="flex flex-col items-center shrink-0">
  10. <view class="font-medium text-sm text-slate-500 font-mono text-center mb-3 dark:text-slate-400">rounded</view>
  11. <view class="p-4 shadow-sm bg-purple-500 w-16 h-16 rounded"></view>
  12. </view>
  13. <view class="flex flex-col items-center shrink-0">
  14. <view class="font-medium text-sm text-slate-500 font-mono text-center mb-3 dark:text-slate-400">rounded-md</view>
  15. <view class="p-4 shadow-sm bg-purple-500 w-16 h-16 rounded-md"></view>
  16. </view>
  17. <view class="flex flex-col items-center shrink-0">
  18. <view class="font-medium text-sm text-slate-500 font-mono text-center mb-3 dark:text-slate-400">rounded-lg</view>
  19. <view class="p-4 shadow-sm bg-purple-500 w-16 h-16 rounded-lg"></view>
  20. </view>
  21. <view class="flex flex-col items-center shrink-0">
  22. <view class="font-medium text-sm text-slate-500 font-mono text-center mb-3 dark:text-slate-400">rounded-full</view>
  23. <view class="p-4 shadow-sm bg-purple-500 w-16 h-16 rounded-full"></view>
  24. </view>
  25. </view>
  26. </JcDemo>
  27. <JcDemo v-bind="BorderWidth">
  28. <div class="grid grid-cols-2 gap-4 text-white text-sm text-center font-bold leading-6">
  29. <div class="flex flex-col items-center shrink-0">
  30. <p class="font-medium text-sm text-slate-500 font-mono text-center mb-3 dark:text-slate-400">border</p>
  31. <div class="p-4 shadow-sm bg-white w-16 h-16 border-indigo-600 border"></div>
  32. </div>
  33. <div class="flex flex-col items-center shrink-0">
  34. <p class="font-medium text-sm text-slate-500 font-mono text-center mb-3 dark:text-slate-400">border-2</p>
  35. <div class="p-4 shadow-sm bg-white w-16 h-16 border-indigo-600 border-2"></div>
  36. </div>
  37. <div class="flex flex-col items-center shrink-0">
  38. <p class="font-medium text-sm text-slate-500 font-mono text-center mb-3 dark:text-slate-400">border-4</p>
  39. <div class="p-4 shadow-sm bg-white w-16 h-16 border-indigo-600 border-4"></div>
  40. </div>
  41. <div class="flex flex-col items-center shrink-0">
  42. <p class="font-medium text-sm text-slate-500 font-mono text-center mb-3 dark:text-slate-400">border-8</p>
  43. <div class="p-4 shadow-sm bg-white w-16 h-16 border-indigo-600 border-8"></div>
  44. </div>
  45. </div>
  46. </JcDemo>
  47. <JcDemo v-bind="BorderColor">
  48. <view class="relative rounded-xl overflow-auto p-8">
  49. <view class="max-w-xs mx-auto space-y-1">
  50. <view class="text-slate-900 text-sm font-medium">Email address</view>
  51. <view>
  52. <input type="text" placeholder="jane@example.com" class="font-sans block text-sm leading-5 py-2 px-3 border-2 border-rose-600 text-slate-500 rounded-lg shadow-sm focus:outline-none focus:ring focus:ring-rose-200 focus:border-rose-500">
  53. </view>
  54. </view>
  55. </view>
  56. </JcDemo>
  57. <JcDemo v-bind="BorderStyle"></JcDemo>
  58. <!-- <JcDemo v-bind="DivideWidth"></JcDemo>
  59. <JcDemo v-bind="DivideColor"></JcDemo>
  60. <JcDemo v-bind="DivideStyle"></JcDemo>
  61. <JcDemo v-bind="OutlineWidth"></JcDemo>
  62. <JcDemo v-bind="OutlineColor"></JcDemo>
  63. <JcDemo v-bind="OutlineStyle"></JcDemo>
  64. <JcDemo v-bind="OutlineOffset"></JcDemo>
  65. <JcDemo v-bind="RingWidth"></JcDemo>
  66. <JcDemo v-bind="RingColor"></JcDemo>
  67. <JcDemo v-bind="RingOffsetWidth"></JcDemo>
  68. <JcDemo v-bind="RingOffsetColor"></JcDemo> -->
  69. </view>
  70. </template>