primevue-mirror/apps/showcase/doc/theming/styled/customization/ComponentDoc.vue

49 lines
1.5 KiB
Vue
Raw Normal View History

2024-03-30 23:15:56 +00:00
<template>
<DocSectionText v-bind="$attrs">
2024-03-31 22:21:51 +00:00
<p>
2024-08-30 21:40:44 +00:00
The design tokens of a specific component is defined at <i>components</i> layer. Overriding components tokens is not the recommended approach if you are building your own style, building your own preset should be preferred instead. This
2024-03-31 22:21:51 +00:00
configuration is global and applies to all card components, in case you need to customize a particular component on a page locally, view the Scoped CSS section for an example.
</p>
2024-03-30 23:15:56 +00:00
</DocSectionText>
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
const MyPreset = definePreset(Aura, {
components: {
card: {
colorScheme: {
light: {
root: {
background: '{surface.0}',
color: '{surface.700}'
},
subtitle: {
color: '{surface.500}'
}
},
dark: {
root: {
background: '{surface.900}',
color: '{surface.0}'
},
subtitle: {
color: '{surface.400}'
}
}
}
}
}
});
`
}
};
}
};
</script>