Skip to content

Commit b9068ec

Browse files
fix: type
1 parent 7d3d120 commit b9068ec

3 files changed

Lines changed: 42 additions & 4 deletions

File tree

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
import type { useTimelineProps } from '@primereact/types/headless/timeline';
22

3-
export const defaultProps: useTimelineProps = {};
3+
export const defaultProps: useTimelineProps = {
4+
align: 'left',
5+
orientation: 'vertical'
6+
};

packages/@primereact/headless/src/timeline/useTimeline.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import { defaultProps } from './useTimeline.props';
44
export const useTimeline = withHeadless({
55
name: 'useTimeline',
66
defaultProps,
7-
setup() {
7+
setup({ props }) {
88
// prop getters
99
const rootProps = {
1010
'data-scope': 'timeline',
11-
'data-part': 'root'
11+
'data-part': 'root',
12+
'data-align': props.align,
13+
'data-orientation': props.orientation
1214
};
1315

1416
return {

packages/@primereact/types/src/headless/breadcrumb/useBreadcrumb.types.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@ export interface useBreadcrumbProps {}
2121
export interface useBreadcrumbState {}
2222

2323
/**
24-
* Data attribute props for the Breadcrumb root element.
24+
* Pre-built props for the Breadcrumb root element.
2525
*/
2626
export interface useBreadcrumbRootProps {
27+
/**
28+
* Component scope identifier.
29+
*/
2730
'data-scope': 'breadcrumb';
31+
/**
32+
* Component part identifier.
33+
*/
2834
'data-part': 'root';
2935
/**
3036
* Accessible label for the breadcrumb navigation.
@@ -36,19 +42,43 @@ export interface useBreadcrumbRootProps {
3642
* Pre-built props for the Breadcrumb ellipsis element.
3743
*/
3844
export interface useBreadcrumbEllipsisProps {
45+
/**
46+
* Component scope identifier.
47+
*/
3948
'data-scope': 'breadcrumb';
49+
/**
50+
* Component part identifier.
51+
*/
4052
'data-part': 'ellipsis';
53+
/**
54+
* ARIA role indicating the element is presentational.
55+
*/
4156
role: 'presentation';
57+
/**
58+
* Hidden from screen readers as it is decorative.
59+
*/
4260
'aria-hidden': true;
4361
}
4462

4563
/**
4664
* Pre-built props for the Breadcrumb separator element.
4765
*/
4866
export interface useBreadcrumbSeparatorProps {
67+
/**
68+
* Component scope identifier.
69+
*/
4970
'data-scope': 'breadcrumb';
71+
/**
72+
* Component part identifier.
73+
*/
5074
'data-part': 'separator';
75+
/**
76+
* ARIA role indicating the element is presentational.
77+
*/
5178
role: 'presentation';
79+
/**
80+
* Hidden from screen readers as it is decorative.
81+
*/
5282
'aria-hidden': true;
5383
}
5484

@@ -58,14 +88,17 @@ export interface useBreadcrumbSeparatorProps {
5888
export interface useBreadcrumbExposes {
5989
/**
6090
* Pre-built props for the root element.
91+
* Includes data attributes and accessible label.
6192
*/
6293
rootProps: useBreadcrumbRootProps;
6394
/**
6495
* Pre-built props for the ellipsis element.
96+
* Includes data attributes, presentational role, and aria-hidden.
6597
*/
6698
ellipsisProps: useBreadcrumbEllipsisProps;
6799
/**
68100
* Pre-built props for the separator element.
101+
* Includes data attributes, presentational role, and aria-hidden.
69102
*/
70103
separatorProps: useBreadcrumbSeparatorProps;
71104
}

0 commit comments

Comments
 (0)