@@ -5,7 +5,8 @@ import { formatBreakpointMods } from '../../helpers/util';
55import { PageContext } from './PageContext' ;
66
77export enum PageSectionVariants {
8- default = 'default'
8+ default = 'default' ,
9+ secondary = 'secondary'
910}
1011
1112export enum PageSectionTypes {
@@ -22,8 +23,8 @@ export interface PageSectionProps extends React.HTMLProps<HTMLDivElement> {
2223 children ?: React . ReactNode ;
2324 /** Additional classes added to the section */
2425 className ?: string ;
25- /** Section background color variant */
26- variant ?: 'default' ;
26+ /** Section background color variant. This will only apply when the type prop has the "default" value. */
27+ variant ?: 'default' | 'secondary' ;
2728 /** Section type variant */
2829 type ?: 'default' | 'nav' | 'subnav' | 'breadcrumb' | 'tabs' | 'wizard' ;
2930 /** Enables the page section to fill the available vertical space */
@@ -74,7 +75,8 @@ const variantType = {
7475} ;
7576
7677const variantStyle = {
77- [ PageSectionVariants . default ] : ''
78+ [ PageSectionVariants . default ] : '' ,
79+ [ PageSectionVariants . secondary ] : styles . modifiers . secondary
7880} ;
7981
8082export const PageSection : React . FunctionComponent < PageSectionProps > = ( {
@@ -112,7 +114,7 @@ export const PageSection: React.FunctionComponent<PageSectionProps> = ({
112114 variantType [ type ] ,
113115 formatBreakpointMods ( padding , styles ) ,
114116 formatBreakpointMods ( stickyOnBreakpoint , styles , 'sticky-' , getVerticalBreakpoint ( height ) , true ) ,
115- variantStyle [ variant ] ,
117+ type === PageSectionTypes . default && variantStyle [ variant ] ,
116118 isFilled === false && styles . modifiers . noFill ,
117119 isFilled === true && styles . modifiers . fill ,
118120 isWidthLimited && styles . modifiers . limitWidth ,
0 commit comments