File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -383,14 +383,15 @@ function AmendmentBadge(props: { amendment: Amendment }) {
383383
384384export function AmendmentDisclaimer ( props : {
385385 name : string ,
386+ compact : boolean
386387} ) {
387388 const [ amendmentStatus , setStatus ] = React . useState < Amendment | null > ( null ) ;
388389 const [ loading , setLoading ] = React . useState ( true ) ;
389390 const [ error , setError ] = React . useState < string | null > ( null ) ;
390391 const { useTranslate } = useThemeHooks ( ) ;
391392 const { translate } = useTranslate ( ) ;
392393
393- const link = ( ) => < Link to = { `/resources/known-amendments#${ props . name . toLowerCase ( ) } ` } > { props . name } amendment</ Link >
394+ const link = ( ) => < Link to = { `/resources/known-amendments#${ props . name . toLowerCase ( ) } ` } > { props . name } { props . compact ? "" : " amendment" } </ Link >
394395
395396 React . useEffect ( ( ) => {
396397 const fetchAmendments = async ( ) => {
@@ -446,6 +447,16 @@ export function AmendmentDisclaimer(props: {
446447 </ em > </ p >
447448 )
448449 }
450+
451+ if ( props . compact ) {
452+ return (
453+ < >
454+ { link ( ) }
455+ { " " }
456+ < AmendmentBadge amendment = { amendmentStatus } />
457+ </ >
458+ )
459+ }
449460
450461 return (
451462 < p > < em > (
Original file line number Diff line number Diff line change @@ -229,6 +229,11 @@ export const amendmentDisclaimer: Schema & { tagName: string } = {
229229 type : 'String' ,
230230 required : true
231231 } ,
232+ compact : {
233+ type : 'Boolean' ,
234+ required : false ,
235+ default : false
236+ }
232237 } ,
233238 render : 'AmendmentDisclaimer' ,
234239 selfClosing : true
You can’t perform that action at this time.
0 commit comments