File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
packages/react-sdk-components/src/components/field/SemanticLink Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 1- import { Link } from '@mui/material' ;
1+ import { FormControl , FormLabel , Link } from '@mui/material' ;
22import makeStyles from '@mui/styles/makeStyles' ;
33
44import type { PConnFieldProps } from '../../../types/PConnProps' ;
@@ -53,6 +53,7 @@ interface SemanticLinkProps extends PConnFieldProps {
5353export default function SemanticLink ( props : SemanticLinkProps ) {
5454 const {
5555 text,
56+ label,
5657 resourcePayload = { } ,
5758 resourceParams = { } ,
5859 getPConnect,
@@ -201,8 +202,15 @@ export default function SemanticLink(props: SemanticLinkProps) {
201202 }
202203
203204 return (
204- < Link component = 'button' { ...linkComponentProps } { ...restProps } onClick = { openLinkClick } data-testid = { testId } >
205- { text }
206- </ Link >
205+ < FormControl variant = 'standard' sx = { { display : 'flex' , flexDirection : 'row' } } >
206+ < FormLabel sx = { { marginRight : '2rem' } } > { label } </ FormLabel >
207+ { text ? (
208+ < Link component = 'button' { ...linkComponentProps } { ...restProps } onClick = { openLinkClick } data-testid = { testId } >
209+ { text }
210+ </ Link >
211+ ) : (
212+ '---'
213+ ) }
214+ </ FormControl >
207215 ) ;
208216}
You can’t perform that action at this time.
0 commit comments