UNPKG

vuestic-ui

Version:
1 lines 848 B
{"version":3,"file":"useElementTextColor.mjs","sources":["../../../../src/composables/useElementTextColor.ts"],"sourcesContent":["import type { Ref } from 'vue'\nimport type { CssColor } from '../composables/useColors'\nimport { useTextColor } from './useTextColor'\n\nconst isRefString = (r: any): r is Ref<string> => typeof r?.value === 'string'\n\n/**\n * Returns text color based on element background.\n *\n * If string (CSS color) provided will use it as background color.\n *\n * If element not provided current instance element will be used.\n */\nexport const useElementTextColor = (background: Ref<CssColor | undefined> | CssColor) => {\n const { textColorComputed } = useTextColor(background)\n return textColorComputed\n}\n"],"names":[],"mappings":";AAaa,MAAA,sBAAsB,CAAC,eAAqD;AACvF,QAAM,EAAE,kBAAA,IAAsB,aAAa,UAAU;AAC9C,SAAA;AACT;"}