Skip to content

Commit 428574d

Browse files
committed
refactor to use labelSuffix prop
1 parent 817508a commit 428574d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/js/src/settings/routes/breadcrumbs.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,8 @@ const Breadcrumbs = () => {
111111
as={ SelectField }
112112
name={ `wpseo_titles.post_types-${ postTypeName }-maintax` }
113113
id={ `input-wpseo_titles-post_types-${ postTypeName }-maintax` }
114-
label={ <>
115-
{ postType.label }
116-
<Code className="yst-ml-2">{ postTypeName }</Code>
117-
</> }
114+
label={ postType.label }
115+
labelSuffix={ <Code className="yst-ml-2">{ postTypeName }</Code> }
118116
options={ postType.options }
119117
className="yst-max-w-sm"
120118
/> ) }
@@ -131,12 +129,10 @@ const Breadcrumbs = () => {
131129
as={ SelectField }
132130
name={ `wpseo_titles.taxonomy-${ taxonomy.name }-ptparent` }
133131
id={ `input-wpseo_titles-taxonomy-${ taxonomy.name }-ptparent` }
134-
label={ <>
135-
{ taxonomy.label }
136-
<Code className="yst-ml-2">{ taxonomy.name }</Code>
137-
</> }
132+
label={ taxonomy.label }
138133
options={ taxonomy.options }
139134
className="yst-max-w-sm"
135+
labelSuffix={ <Code className="yst-ml-2">{ taxonomy.name }</Code> }
140136
/>
141137
) ) }
142138
</FieldsetLayout>

0 commit comments

Comments
 (0)