HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall/node_modules/flowbite-vue/src/components/Typography/FwbP.vue
<template>
  <p :class="[color, sizes[size], heights[height], weights[weight], whitespaces[whitespace], aligns[align]]">
    <slot />
  </p>
</template>

<script setup lang="ts">
interface ParagraphProps {
  height?: 'normal' | 'relaxed' | 'loose'
  color?: string
  size?: string
  weight?: string
  whitespace?: string
  align?: string
}

withDefaults(defineProps<ParagraphProps>(), {
  height: 'normal',
  color: 'text-gray-900 dark:text-white',
  size: '',
  weight: '',
  whitespace: '',
  align: '',
})

const sizes: Record<string, string> = {
  xs: 'text-xs',
  sm: 'text-sm',
  base: 'text-base',
  lg: 'text-lg',
  xl: 'text-xl',
}

const weights: Record<string, string> = {
  thin: 'font-thin',
  extralight: 'font-extralight',
  light: 'font-light',
  normal: 'font-normal',
  medium: 'font-medium',
  semibold: 'font-semibold',
  bold: 'font-bold',
  extrabold: 'font-extrabold',
  black: 'font-black',
}

const aligns: Record<string, string> = {
  left: 'text-left',
  center: 'text-center',
  right: 'text-right',
}

const heights: Record<string, string> = {
  normal: 'leading-normal',
  relaxed: 'leading-relaxed',
  loose: 'leading-loose',
}

const whitespaces: Record<string, string> = {
  normal: 'whitespace-normal',
  nowrap: 'whitespace-nowrap',
  pre: 'whitespace-pre',
  preline: 'whitespace-pre-line',
  prewrap: 'whitespace-pre-wrap',
}
</script>