2024-03-30 23:15:56 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="notification mb-4">This is a proposed api for beta.2, and not yet available in beta.1.</div>
|
2024-03-30 23:15:56 +00:00
|
|
|
<p>The <i>$dt</i> function returns the information about a token like the full path and value. This would be useful if you need to access tokens programmatically.</p>
|
|
|
|
</DocSectionText>
|
|
|
|
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code: {
|
|
|
|
basic: `
|
|
|
|
import { $dt } from 'primevue/themes';
|
|
|
|
|
2024-03-31 22:21:51 +00:00
|
|
|
const duration = $dt('transition.duration');
|
|
|
|
/*
|
|
|
|
duration: {
|
|
|
|
name: '--transition-duration',
|
|
|
|
variable: 'var(--p-transition-duration)',
|
|
|
|
value: '0.2s'
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
const primaryColor = $dt('primary.color');
|
|
|
|
/*
|
|
|
|
primaryColor: {
|
|
|
|
name: '--primary-color',
|
|
|
|
variable: 'var(--p-primary-color)',
|
|
|
|
value: {
|
|
|
|
light: {
|
|
|
|
value: '#10b981',
|
|
|
|
path: {
|
|
|
|
name: 'semantic.primary.color',
|
|
|
|
binding: {
|
|
|
|
name: 'primitive.emerald.500'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
dark: {
|
|
|
|
value: '#34d399',
|
|
|
|
path: {
|
|
|
|
name: 'semantic.primary.color',
|
|
|
|
binding: {
|
|
|
|
name: 'primitive.emerald.400'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
2024-03-30 23:15:56 +00:00
|
|
|
`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|