File tree Expand file tree Collapse file tree 7 files changed +35
-5
lines changed
packages/plus/src/components Expand file tree Collapse file tree 7 files changed +35
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @ultraviolet/plus " : patch
3+ ---
4+
5+ Add missing ` className ` and ` data-testid ` on some components
Original file line number Diff line number Diff line change @@ -24,14 +24,23 @@ const StyledDl = styled('dl', {
2424type InfoTableProps = {
2525 children : ReactNode
2626 width ?: string
27+ className ?: string
28+ 'data-testid' ?: string
2729}
2830
2931/**
3032 * Use this component to display offers.
3133 * Create rows with `InfoTable.Row` and place cells within each row using `InfoTable.Cell`.
3234 */
33- export const InfoTable = ( { children, width } : InfoTableProps ) => (
34- < StyledDl width = { width } > { children } </ StyledDl >
35+ export const InfoTable = ( {
36+ children,
37+ width,
38+ className,
39+ 'data-testid' : dataTestId ,
40+ } : InfoTableProps ) => (
41+ < StyledDl className = { className } data-testid = { dataTestId } width = { width } >
42+ { children }
43+ </ StyledDl >
3544)
3645
3746InfoTable . Row = InfoTableRow
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ export const NavigationContent = ({
9696 logo,
9797 onWidthResize,
9898 className,
99+ 'data-testid' : dataTestId ,
99100 id,
100101 onToggleExpand,
101102} : NavigationProps ) => {
@@ -202,7 +203,7 @@ export const NavigationContent = ({
202203 ] )
203204
204205 return (
205- < StyledNav className = { className } id = { id } >
206+ < StyledNav className = { className } data-testid = { dataTestId } id = { id } >
206207 < Container
207208 data-animation = { shouldAnimate ? animation : undefined }
208209 data-expanded = { expanded }
Original file line number Diff line number Diff line change @@ -39,4 +39,5 @@ export type NavigationProps = {
3939 * This function will be called when the user toggle the expand/collapse button or with the slider.
4040 */
4141 onToggleExpand ?: ( expanded : boolean ) => void
42+ 'data-testid' ?: string
4243}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ const StyledList = styled(List)`
1414 width: ${ ( { theme } ) => theme . sizing [ 700 ] } ;
1515 min-width: ${ ( { theme } ) => theme . sizing [ 700 ] } ;
1616 max-width: ${ ( { theme } ) => theme . sizing [ 700 ] } ;
17- }
17+ }
1818`
1919
2020type OfferListProps = Omit <
@@ -30,6 +30,8 @@ type OfferListProps = Omit<
3030 * Pre-selected rows (using their offerName). Must be an array when `type = "checkbox"`.
3131 */
3232 selected ?: string | string [ ]
33+ [ 'data-testid' ] ?: string
34+ className ?: string
3335}
3436
3537export const OfferList = ( {
@@ -41,6 +43,8 @@ export const OfferList = ({
4143 autoCollapse,
4244 selected,
4345 onChangeSelect,
46+ className,
47+ 'data-testid' : dataTestId ,
4448} : OfferListProps ) => {
4549 const [ radioSelectedRow , setRadioSelectedRow ] = useState < string | undefined > (
4650 typeof selected === 'string' ? selected : undefined ,
@@ -82,7 +86,9 @@ export const OfferList = ({
8286 >
8387 < StyledList
8488 autoCollapse = { autoCollapse }
89+ className = { className }
8590 columns = { computedColumns }
91+ data-testid = { dataTestId }
8692 expandable = { false }
8793 selectable = { false }
8894 >
Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ export const OrderSummary = ({
5252 onChangeUnitInput,
5353 totalPriceDescription,
5454 additionalInfo,
55+ className,
56+ 'data-testid' : dataTestId ,
5557} : OrderSummaryProps ) => {
5658 const [ timePeriodUnit , setTimePeriodUnit ] = useState < TimeUnit > ( unitUnitInput )
5759 const [ timePeriodAmount , setTimePeriodAmount ] = useState ( valueUnitInput )
@@ -152,7 +154,11 @@ export const OrderSummary = ({
152154
153155 return (
154156 < OrderSummaryContext . Provider value = { valueContext } >
155- < Container justifyContent = { hideDetails ? 'flex-start' : 'space-between' } >
157+ < Container
158+ className = { className }
159+ data-testId = { dataTestId }
160+ justifyContent = { hideDetails ? 'flex-start' : 'space-between' }
161+ >
156162 { header ? (
157163 < HeaderContainer
158164 data-hidedetails = { hideDetails }
Original file line number Diff line number Diff line change @@ -119,4 +119,6 @@ export type OrderSummaryProps = {
119119 */
120120 onChange ?: ( price : PriceType , totalPrice : PriceTypeSingle ) => void
121121 hideDetails ?: boolean
122+ className ?: string
123+ [ 'data-testid' ] ?: string
122124} & PeriodProps
You can’t perform that action at this time.
0 commit comments