Skip to content

Commit

Permalink
WOS-168 Content Text weight (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrechern committed Apr 28, 2023
1 parent d6e0fa3 commit 833bbde
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
@Model(adaptables = Resource.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
public class ContentComponent {

public static final String TEXT_WEIGHT_DEFAULT = "has-text-weight-normal";
@Inject
@Getter
@Default(values = "Content")
Expand All @@ -36,4 +37,9 @@ public class ContentComponent {
@Getter
@Default(values = StringUtils.EMPTY)
private String size;

@Inject
@Getter
@Default(values = TEXT_WEIGHT_DEFAULT)
private String textWeight;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"sling:resourceType": "wcm/dialogs/components/select",
"name": "textWeight",
"label": "Text weight",
"light": {
"sling:resourceType": "wcm/dialogs/components/select/selectitem",
"label": "Light",
"value": "has-text-weight-light"
},
"normal": {
"sling:resourceType": "wcm/dialogs/components/select/selectitem",
"label": "Normal",
"value": "has-text-weight-normal",
"selected": "true"
},
"medium": {
"sling:resourceType": "wcm/dialogs/components/select/selectitem",
"label": "Medium",
"value": "has-text-weight-medium"
},
"semibold": {
"sling:resourceType": "wcm/dialogs/components/select/selectitem",
"label": "Semi-bold",
"value": "has-text-weight-semibold"
},
"bold": {
"sling:resourceType": "wcm/dialogs/components/select/selectitem",
"label": "Bold",
"value": "has-text-weight-bold"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/-->

<sly data-sly-use.model="pl.ds.bulma.components.models.ContentComponent">
<div class="content ${model.size}">
<div class="content ${model.size} ${model.textWeight}">
${model.text @ context='html'}
</div>
</sly>
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
"size": {
"sling:resourceType": "wcm/dialogs/components/include",
"path": "/apps/bulma/components/common/size"
},
"textweight": {
"sling:resourceType": "wcm/dialogs/components/include",
"path": "/apps/bulma/components/common/textweight"
}
}
}
Expand Down

0 comments on commit 833bbde

Please sign in to comment.