Update vite doc
parent
0e70f79124
commit
e25711fb48
|
@ -1,16 +1,7 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>
|
||||
Styled mode is based on pre-skinned components with opinionated themes like Material, Bootstrap or PrimeOne themes. Theme is the required css file to be imported, visit the
|
||||
<NuxtLink to="/theming/#themes">Themes</NuxtLink> section for the complete list of available themes to choose from.
|
||||
</p>
|
||||
<DocSectionCode :code="code1" hideToggleCode importCode hideStackBlitz />
|
||||
<p>
|
||||
The style classes of PrimeVue are defined under the <i>primevue</i> CSS layer to be easier to customize by having low specificity. If you are using a CSS library that styles default HTML elements such as Tailwind Preflight, Bootstrap,
|
||||
Normalize, or similar, a custom CSS layer configuration might be necessary. This only applies to Styled Mode as Unstyled Mode does not use any default styles or layers. View the <NuxtLink to="/csslayer">CSS Layer</NuxtLink> guide for more
|
||||
information.
|
||||
</p>
|
||||
<DocSectionCode :code="code2" hideToggleCode importCode hideStackBlitz />
|
||||
<p>Styled mode is based on pre-skinned components with opinionated themes, default theme Aura with emerald as the primary color. See the <NuxtLink to="/theming/styled">styled mode</NuxtLink> documentation to for customization.</p>
|
||||
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
|
||||
</DocSectionText>
|
||||
</template>
|
||||
|
||||
|
@ -18,24 +9,13 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
code1: {
|
||||
code: {
|
||||
basic: `
|
||||
//in main.js
|
||||
import 'primevue/resources/themes/aura-light-green/theme.css'
|
||||
`
|
||||
},
|
||||
code2: {
|
||||
basic: `
|
||||
/* Order */
|
||||
@layer reset, primevue;
|
||||
import { createApp } from 'vue';
|
||||
import PrimeVueStyled from 'primevue/styled';
|
||||
|
||||
/* Reset CSS */
|
||||
@layer reset {
|
||||
button,
|
||||
input {
|
||||
/* CSS to Reset */
|
||||
}
|
||||
}
|
||||
const app = createApp(App);
|
||||
app.use(PrimeVueStyled);
|
||||
`
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>
|
||||
Unstyled mode is disabled by default for all components. Using the PrimeVue plugin during installation, set <i>unstyled</i> as true to enable it globally. Visit the <NuxtLink to="/unstyled">Unstyled mode</NuxtLink> documentation for more
|
||||
information and examples.
|
||||
</p>
|
||||
<p>In unstyled mode, the components do not include any CSS so you'd need to style the components on your end. Visit the <NuxtLink to="/unstyled">Unstyled mode</NuxtLink> documentation for more information and examples.</p>
|
||||
<DocSectionCode :code="code1" hideToggleCode importCode hideStackBlitz />
|
||||
<p>In unstyled mode, you'd need to style the components on your end. If you are using Tailwind CSS, see the <a href="https://tailwind.primevue.org/vite/">Tailwind CSS Presets</a> project to get you started.</p>
|
||||
<p>If you are using Tailwind CSS, see the <a href="https://tailwind.primevue.org/vite/">Tailwind CSS Presets</a> project to get you started with styling the components with Tailwind utility classes.</p>
|
||||
<DocSectionCode :code="code2" hideToggleCode importCode hideStackBlitz />
|
||||
</DocSectionText>
|
||||
</template>
|
||||
|
@ -17,23 +14,20 @@ export default {
|
|||
code1: {
|
||||
basic: `
|
||||
import { createApp } from "vue";
|
||||
import PrimeVue from "primevue/config";
|
||||
import PrimeVueUnstyled from "primevue/config";
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(PrimeVue, {
|
||||
unstyled: true
|
||||
});
|
||||
app.use(PrimeVueUnstyled);
|
||||
`
|
||||
},
|
||||
code2: {
|
||||
basic: `
|
||||
import { createApp } from 'vue';
|
||||
import PrimeVue from 'primevue/config';
|
||||
import PrimeVueUnstyled from 'primevue/config';
|
||||
import Lara from '@/presets/lara'; //import preset
|
||||
|
||||
const app = createApp(App);
|
||||
app.use(PrimeVue, {
|
||||
unstyled: true,
|
||||
app.use(PrimeVueUnstyled, {
|
||||
pt: Lara //apply preset
|
||||
});
|
||||
`
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>Each component can be imported and registered individually so that you only bundle what you use. Import path is available in the documentation of the corresponding component.</p>
|
||||
<p>
|
||||
Each component can be imported and registered individually so that you only bundle what you use. Import path is available in the documentation of the corresponding component. You may also use
|
||||
<NuxtLink to="/autoimport">auto imports</NuxtLink> via the unplugin-vue-components plugin.
|
||||
</p>
|
||||
</DocSectionText>
|
||||
<div class="card flex justify-content-center">
|
||||
<Button label="Check" icon="pi pi-check" />
|
||||
|
|
|
@ -22,7 +22,6 @@ import PluginDoc from '@/doc/vite/PluginDoc.vue';
|
|||
import StyledModeDoc from '@/doc/vite/StyledModeDoc.vue';
|
||||
import UnstyledModeDoc from '@/doc/vite/UnstyledModeDoc.vue';
|
||||
import UsageDoc from '@/doc/vite/UsageDoc.vue';
|
||||
import CreateVueDoc from '@/doc/vite/videos/CreateVueDoc.vue';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -36,12 +35,9 @@ export default {
|
|||
{
|
||||
id: 'plugin',
|
||||
label: 'Plugin',
|
||||
component: PluginDoc
|
||||
},
|
||||
{
|
||||
id: 'theming',
|
||||
label: 'Theming',
|
||||
description: 'PrimeVue has two theming modes; styled or unstyled.',
|
||||
component: PluginDoc,
|
||||
description: `PrimeVue plugin is required to be installed as an application plugin to set up the default configuration. The plugin is lightweight, only sets up the configuration object without affecting your application. PrimeVue has two plugins; Styled and Unstyled. If you are
|
||||
just getting started, we suggest to using the styled mode.`,
|
||||
children: [
|
||||
{
|
||||
id: 'styled',
|
||||
|
@ -64,11 +60,6 @@ export default {
|
|||
id: 'examples',
|
||||
label: 'Examples',
|
||||
component: ExamplesDoc
|
||||
},
|
||||
{
|
||||
id: 'videos',
|
||||
label: 'Video Tutorial',
|
||||
component: CreateVueDoc
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue