File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments