Skip to content

Commit 631859d

Browse files
committed
feat: moved indicator into it's own package
BREAKING CHANGE: You now create a `PagerIndicator`(from `@nativescript-community/ui-pager-indicator) and set `pagerViewId` on it to the id of your Pager.
1 parent 2487f0c commit 631859d

36 files changed

+4874
-592
lines changed

demo-snippets/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"private": true,
44
"version": "0.0.1",
55
"dependencies": {
6-
"@nativescript-community/ui-pager": "link:../packages/ui-pager"
6+
"@nativescript-community/ui-pager": "link:../packages/ui-pager",
7+
"@nativescript-community/ui-pager-indicator": "link:../packages/ui-pager-indicator"
78
}
89
}

demo-snippets/vue/Indicator.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
<Label text="Indicator" />
66
</ActionBar>
77

8-
<StackLayout class="page">
9-
<Pager ref="pager" for="item in items" :selectedIndex="selectedIndex" @selectedIndexChange="selectedIndexChange" height="300" indicator="fill" showIndicator="true">
8+
<GridLayout class="page" rows="*,auto">
9+
<Pager ref="pager" id="pager" :items="items" :selectedIndex="selectedIndex" @selectedIndexChange="selectedIndexChange">
1010
<v-template>
1111
<GridLayout :backgroundColor="item.color">
1212
<Label :text="item.title" />
1313
</GridLayout>
1414
</v-template>
1515
</Pager>
16-
<Button text="Reset" @tap="resetPager" />
17-
</StackLayout>
16+
<PagerIndicator pagerViewId="pager" type="fill" verticalAlignment="bottom" horizontalAlignment="center" marginBottom="10"/>
17+
<Button row="1" text="Reset" @tap="resetPager" />
18+
</GridLayout>
1819
</Page>
1920
</template>
2021

demo-snippets/vue/install.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import RenderIssue from './RenderIssue.vue';
88

99
export function installPlugin() {
1010
Vue.use(Pager);
11+
Vue.registerElement('PagerIndicator', () => require('@nativescript-community/ui-pager-indicator').PagerIndicator);
1112
}
1213

1314
export const demos = [

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
]
5252
},
5353
"dependencies": {
54-
"@nativescript-community/plugin-seed-tools": "file:tools"
54+
"@nativescript-community/plugin-seed-tools": "file:tools",
55+
"@nativescript-community/template-snippet": "file:demo-snippets"
5556
},
5657
"ntl": {
5758
"descriptions": {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
tsconfig.json
3+
node_modules/
4+
pnpm-global/
5+
CHANGELOG.md
6+
blueprint.md
7+
*.aar
8+
*.jar

0 commit comments

Comments
 (0)