Skip to content

Commit

Permalink
feat(VPagination): add props for coloring navigation buttons (#15691)
Browse files Browse the repository at this point in the history
  • Loading branch information
luan0ap committed Jul 5, 2023
1 parent a0d8d34 commit a85b85f
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions packages/vuetify/src/components/VPagination/VPagination.ts
Expand Up @@ -29,6 +29,8 @@ export default mixins(
props: {
circle: Boolean,
disabled: Boolean,
navigationColor: String,
navigationTextColor: String,
length: {
type: Number,
default: 0,
Expand Down Expand Up @@ -181,18 +183,21 @@ export default mixins(
},
genIcon (h: CreateElement, icon: string, disabled: boolean, fn: EventListener, label: String): VNode {
return h('li', [
h('button', {
staticClass: 'v-pagination__navigation',
class: {
'v-pagination__navigation--disabled': disabled,
},
attrs: {
disabled,
type: 'button',
'aria-label': label,
},
on: disabled ? {} : { click: fn },
}, [h(VIcon, [icon])]),
h('button',
this.setBackgroundColor(this.navigationColor, {
staticClass: 'v-pagination__navigation',
class: {
'v-pagination__navigation--disabled': disabled,
},
attrs: {
disabled,
type: 'button',
'aria-label': label,
},
on: disabled ? {} : { click: fn },
}),
[h(VIcon, { props: { color: this.navigationTextColor } }, [icon])]
),
])
},
genItem (h: CreateElement, i: string | number): VNode {
Expand Down

0 comments on commit a85b85f

Please sign in to comment.