Skip to content

Commit c2c1b8f

Browse files
author
Dipak Sarkar
committed
updated docs
1 parent d46a098 commit c2c1b8f

File tree

3 files changed

+98
-18
lines changed

3 files changed

+98
-18
lines changed

docs/.vuepress/clientAppEnhance.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
import number from "../../src";
22
import { defineClientAppEnhance } from "@vuepress/client";
3-
import { Quasar } from "quasar";
3+
import { QInput, QList, QField, QCheckbox } from "quasar";
44

55
// Import Quasar css
66
import "quasar/dist/quasar.css";
77

88
export default defineClientAppEnhance(({ app }) => {
9-
console.log("app", app);
10-
app.use(Quasar, {
11-
plugins: {}, // import Quasar plugins and add here
12-
config: {
13-
dark: true,
14-
},
15-
});
9+
app.component("q-input", QInput);
10+
app.component("q-list", QList);
11+
app.component("q-field", QField);
12+
app.component("q-checkbox", QCheckbox);
1613
app.use(number);
1714
});

docs/.vuepress/components/PlayGround.vue

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
22
<div class="row q-col-gutter-lg">
33
<div class="col-sm-8 col-sx-12">
4-
<q-list class="q-gutter-y-sm">
4+
<q-list :dark="isDark" class="q-gutter-y-sm">
55
<div class="column">
66
<div class="text-h6">Component</div>
7-
<q-field dense outlined v-model="price">
7+
<q-field :dark="isDark" dense outlined v-model="price">
88
<template
99
v-slot:control="{ id, floatingLabel, modelValue, emitValue }"
1010
>
@@ -24,7 +24,7 @@
2424
</div>
2525
<div class="column">
2626
<div class="text-h6">Reverse Fill</div>
27-
<q-field dense outlined v-model="reverseFill">
27+
<q-field :dark="isDark" dense outlined v-model="reverseFill">
2828
<template
2929
v-slot:control="{ id, floatingLabel, modelValue, emitValue }"
3030
>
@@ -44,7 +44,12 @@
4444
</div>
4545
<div class="column">
4646
<div class="text-h6">Directive</div>
47-
<q-field dense outlined hint="masking doesn't work with directive">
47+
<q-field
48+
:dark="isDark"
49+
dense
50+
outlined
51+
hint="masking doesn't work with directive"
52+
>
4853
<template v-slot:control>
4954
<input
5055
type="tel"
@@ -62,26 +67,56 @@
6267
</q-list>
6368
</div>
6469
<div class="col-sm-4 col-xs-12">
65-
<q-list class="q-gutter-y-sm">
66-
<q-input dense v-model="config.prefix" type="text" label="Prefix" />
67-
<q-input dense v-model="config.suffix" type="text" label="Suffix" />
70+
<q-list :dark="isDark" class="q-gutter-y-sm">
6871
<q-input
72+
:dark="isDark"
73+
dense
74+
v-model="config.prefix"
75+
type="text"
76+
label="Prefix"
77+
/>
78+
<q-input
79+
:dark="isDark"
80+
dense
81+
v-model="config.suffix"
82+
type="text"
83+
label="Suffix"
84+
/>
85+
<q-input
86+
:dark="isDark"
6987
dense
7088
v-model.number="config.precision"
7189
type="number"
7290
min="0"
7391
max="5"
7492
label="Precision"
7593
/>
76-
<q-input dense v-model="config.decimal" type="text" label="Decimal" />
7794
<q-input
95+
:dark="isDark"
96+
dense
97+
v-model="config.decimal"
98+
type="text"
99+
label="Decimal"
100+
/>
101+
<q-input
102+
:dark="isDark"
78103
dense
79104
v-model="config.separator"
80105
type="text"
81106
label="Separator"
82107
/>
83-
<q-checkbox dense v-model="config.masked" label="Masked" />
84-
<q-checkbox dense v-model="config.reverseFill" label="Reverse Fill" />
108+
<q-checkbox
109+
:dark="isDark"
110+
dense
111+
v-model="config.masked"
112+
label="Masked"
113+
/>
114+
<q-checkbox
115+
:dark="isDark"
116+
dense
117+
v-model="config.reverseFill"
118+
label="Reverse Fill"
119+
/>
85120
</q-list>
86121
</div>
87122
</div>
@@ -111,6 +146,16 @@ export default {
111146
},
112147
};
113148
},
149+
computed: {
150+
isDark() {
151+
return this.$theme.darkMode;
152+
},
153+
},
154+
watch: {
155+
isDark(value) {
156+
console.log("isDark:watch", value);
157+
},
158+
},
114159
};
115160
</script>
116161

docs/.vuepress/styles/index.scss

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.home .hero img {
2+
max-width: 450px !important;
3+
}
4+
5+
h1 {
6+
font-size: 2.2rem !important;
7+
}
8+
9+
h2 {
10+
font-size: 1.65rem !important;
11+
padding-bottom: 0.3rem !important;
12+
border-bottom: 1px solid var(--c-border);
13+
transition: border-color var(--t-color);
14+
-webkit-transition: border-color var(--t-color);
15+
-moz-transition: border-color var(--t-color);
16+
-ms-transition: border-color var(--t-color);
17+
-o-transition: border-color var(--t-color);
18+
}
19+
20+
h1,
21+
h2,
22+
h3,
23+
h4,
24+
h5,
25+
h6 {
26+
font-weight: 600 !important;
27+
line-height: 1.25 !important;
28+
}
29+
30+
.theme-default-content:not(.custom),
31+
.page-edit,
32+
.page-nav {
33+
max-width: 840px !important;
34+
}
35+
36+
.toggle-dark-button {
37+
display: none;
38+
}

0 commit comments

Comments
 (0)