diff --git a/components/lib/steps/BaseSteps.vue b/components/lib/steps/BaseSteps.vue index a0b03968e..e90d58ebc 100644 --- a/components/lib/steps/BaseSteps.vue +++ b/components/lib/steps/BaseSteps.vue @@ -57,7 +57,7 @@ const styles = ` `; const classes = { - root: ({ instance }) => ['p-steps p-component', { 'p-readonly': instance.readonly }], + root: ({ props }) => ['p-steps p-component', { 'p-readonly': props.readonly }], menu: 'p-steps-list', menuitem: ({ instance, item }) => [ 'p-steps-item', diff --git a/components/lib/steps/Steps.d.ts b/components/lib/steps/Steps.d.ts index 6430cb908..9c5461334 100755 --- a/components/lib/steps/Steps.d.ts +++ b/components/lib/steps/Steps.d.ts @@ -20,6 +20,7 @@ export declare type StepsPassThroughOptionType = StepsPassThroughAttributes | (( export interface StepsPassThroughMethodOptions { instance: any; props: StepsProps; + context: StepsContext; } /** @@ -65,6 +66,26 @@ export interface StepsPassThroughAttributes { [key: string]: any; } +/** + * Defines current options in Steps component. + */ +export interface StepsContext { + /** + * Index of the menuitem. + */ + index: number; + /** + * Current active state of menuitem as a boolean. + * @defaultValue false + */ + active: boolean; + /** + * Current disabled state of menuitem as a boolean. + * @defaultValue false + */ + disabled: boolean; +} + /** * Defines valid properties in Steps component. */ diff --git a/components/lib/steps/Steps.vue b/components/lib/steps/Steps.vue index 14d13e551..fcdac9553 100755 --- a/components/lib/steps/Steps.vue +++ b/components/lib/steps/Steps.vue @@ -2,7 +2,7 @@