Skip to content

Commit

Permalink
feat: add light color for text
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaubree committed Jul 28, 2023
1 parent e0202d9 commit c31a2b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
})()
</script>
</head>
<body class="font-sans antialiased bg-white transition-colors dark:bg-dark-900 dark:text-light-500">
<body class="font-sans antialiased bg-white text-dark-500 transition-colors dark:bg-black dark:text-light-500">
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<noscript>This website requires JavaScript to function properly. Please enable JavaScript to continue.</noscript>
</body>
</html>
</html>
3 changes: 2 additions & 1 deletion src/components/text/UText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ const { primaryColor } = useAppTheme()
const config = computed(() => merge({}, useAppUi().text, props.ui))
const buttonClass = computed(() => {
const color = config.value.color?.[props.color] || config.value.color?.[primaryColor.value] || config.value.text
const color = config.value.color?.[props.color] || config.value.color?.[primaryColor.value] || config.value.color.default
return classNames(
color.replaceAll('{color}', props.color),
config.value.color.base,
config.value.size,
config.value.font,
)
Expand Down
4 changes: 3 additions & 1 deletion src/components/text/text.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import type { Color } from '~/types'

export const text = {
text: 'text-{color}-500 dark:text-{color}-400',
font: 'font-400',
size: 'text-13px',
color: {
base: 'transition-colors',
default: 'text-{color}-500 dark:text-{color}-400',
fluo: 'text-{color}-700 dark:text-{color}-400',
cyan: 'text-{color}-700 dark:text-{color}-400',
yellow: 'text-{color}-700 dark:text-{color}-400',
silver: 'text-{color}-700 dark:text-{color}-400',
dark: 'text-dark-500 dark:text-light-500',
light: 'text-dark-200 dark:text-light-700',
},
default: {
color: 'dark' as Color,
Expand Down

0 comments on commit c31a2b6

Please # to comment.