Skip to content

Commit 123946d

Browse files
github-actions[bot]CopilotjsakamotoChronosSF
authored
[jp-sync] Sync jp/components/badge.md with English badge updates (#6465)
* docs(jp): sync badge.md with English updates - Add new section 'バッジの値とアイコン' (Badge Value and Icon) - Update NOTE to include 'value' input reference Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs(jp): refine wording in badge.md translation --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jsakamoto <junichi.jp@gmail.com> Co-authored-by: Stamen Stoychev <sstoychev@infragistics.com>
1 parent ae0317f commit 123946d

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

jp/components/badge.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,31 @@ igx-badge {
139139
}
140140
```
141141

142+
### バッジの値とアイコン
143+
144+
バッジ内にテキストまたは数値カウントを表示するには、`[value]` 入力を使用します。コンテンツを直接埋め込む方法よりも、この方法が推奨されます。
145+
146+
```html
147+
<!-- 推奨 -->
148+
<igx-badge [value]="model.value"></igx-badge>
149+
150+
<!-- 非推奨 -->
151+
<igx-badge>{{ model.value }}</igx-badge>
152+
```
153+
154+
`[icon]``[value]` の両方が設定されている場合、バッジは両方を同時に表示します。
155+
156+
```html
157+
<!-- アイコン "check" と値 "5" の両方が表示されます -->
158+
<igx-badge icon="check" value="5" type="success"></igx-badge>
159+
```
160+
161+
アイコンなしで数値のみを表示するには、`[icon]` を設定しないようにしてください。
162+
163+
```html
164+
<igx-badge [value]="unreadCount" type="info"></igx-badge>
165+
```
166+
142167
### バッジのアイコン
143168

144169
`igx-badge` コンポーネントは、マテリアル アイコンに加えて[マテリアル アイコン拡張](../components/material-icons-extended.md)およびその他のカスタム アイコン セットの使用もサポートしています。マテリアル アイコン拡張セットからバッジ コンポーネントにアイコンを追加するには、まずそのアイコンを登録する必要があります。
@@ -196,7 +221,7 @@ export class AppModule {}
196221
```
197222

198223
>[!NOTE]
199-
>[`igx-badge`]({environment:angularApiUrl}/classes/igxbadgecomponent.html) には、バッジの外観を構成するための [`icon`]({environment:angularApiUrl}/classes/igxbadgecomponent.html#icon) および [`type`]({environment:angularApiUrl}/classes/igxbadgecomponent.html#type) 入力があります。公式の[マテリアル アイコン セット](https://material.io/icons/)から名前を指定して、アイコンを設定できます。バッジタイプは、[`default`]({environment:angularApiUrl}/enums/type.html#default)[`info`]({environment:angularApiUrl}/enums/type.html#info)[`success`]({environment:angularApiUrl}/enums/type.html#success)[`warning`]({environment:angularApiUrl}/enums/type.html#warning)、または [`error`]({environment:angularApiUrl}/enums/type.html#error) のいずれかに設定できます。その型により、特定の背景の色が適用されます。
224+
>[`igx-badge`]({environment:angularApiUrl}/classes/igxbadgecomponent.html) には、バッジの外観を構成するための [`icon`]({environment:angularApiUrl}/classes/igxbadgecomponent.html#icon)[`value`]({environment:angularApiUrl}/classes/igxbadgecomponent.html#value)および [`type`]({environment:angularApiUrl}/classes/igxbadgecomponent.html#type) 入力があります。公式の[マテリアル アイコン セット](https://material.io/icons/)から名前を指定して、アイコンを設定できます。バッジタイプは、[`default`]({environment:angularApiUrl}/enums/type.html#default)[`info`]({environment:angularApiUrl}/enums/type.html#info)[`success`]({environment:angularApiUrl}/enums/type.html#success)[`warning`]({environment:angularApiUrl}/enums/type.html#warning)、または [`error`]({environment:angularApiUrl}/enums/type.html#error) のいずれかに設定できます。その型により、特定の背景の色が適用されます。
200225
201226
サンプルでは、[`icon`]({environment:angularApiUrl}/classes/igxbadgecomponent.html#icon)[`type`]({environment:angularApiUrl}/classes/igxbadgecomponent.html#type) が icon と type という名前のモデルプロパティにバインドされています。
202227

0 commit comments

Comments
 (0)