@@ -5,6 +5,8 @@ import { Link } from 'react-router-dom';
55import {
66 Breadcrumb , Col , Container , Row , Button , Badge ,
77 Stack ,
8+ useMediaQuery ,
9+ breakpoints ,
810} from '@openedx/paragon' ;
911
1012interface BreadcrumbLink {
@@ -37,7 +39,9 @@ export const ActionButton = ({ label, icon, onClick }: Action) => (
3739
3840const AuthZTitle = ( {
3941 activeLabel, navLinks = [ ] , pageTitle, pageSubtitle, actions = [ ] ,
40- } : AuthZTitleProps ) => (
42+ } : AuthZTitleProps ) => {
43+ const isDesktop = useMediaQuery ( { minWidth : breakpoints . large . minWidth } ) ;
44+ return (
4145 < Container className = "p-5 bg-light-100" >
4246 < Breadcrumb
4347 linkAs = { Link }
@@ -51,8 +55,8 @@ const AuthZTitle = ({
5155 ? < h3 > < Badge className = "py-2 px-3 font-weight-normal" variant = "light" > { pageSubtitle } </ Badge > </ h3 >
5256 : pageSubtitle }
5357 </ Col >
54- < Col xs = { 12 } md = { 5 } >
55- < Stack gap = { 3 } direction = "horizontal" >
58+ < Col xs = { 12 } md = { 5 } >
59+ < Stack className = "justify-content-end" direction = { isDesktop ? "horizontal" : "vertical" } >
5660 {
5761 actions . map ( ( action , index ) => {
5862 const content = isValidElement ( action )
@@ -65,7 +69,7 @@ const AuthZTitle = ({
6569 < Fragment key = { `authz-header-action-${ key } ` } >
6670 { content }
6771 { ( index === actions . length - 1 ) ? null
68- : ( < hr className = "border-right" /> ) }
72+ : ( < hr className = 'mx-lg-5' /> ) }
6973 </ Fragment >
7074 ) ;
7175 } )
@@ -74,6 +78,6 @@ const AuthZTitle = ({
7478 </ Col >
7579 </ Row >
7680 </ Container >
77- ) ;
81+ ) } ;
7882
7983export default AuthZTitle ;
0 commit comments