<1 min read



Component that renders the @empathyco/x-types#Result current price that may or may not be on sale.


Name Description Type Default
result (Required) The @empathyco/x-types#Result information. Result
format Format or mask to be defined as string.
- Use 'i' to define integer numbers.
- Use 'd' to define decimal numbers. You can define the length of the decimal part. If the
doesn't include decimals, it is filled with zeros until reach the length defined with 'd's.
- Integer separator must be defined between the 3rd and the 4th integer 'i' of a group.
- Decimal separator must be defined between the last 'i' and the first 'd'. It can be more
than one character.
- Set whatever you need around the integers and decimals marks.
- Default mask: 'i.iii,dd' which returns '1.345,67'.


Name Description Bindings
(name - type - description)
default Base currency item result result - Result data


Basic example

This component shows the current price formatted. You can provide the format by property or let the BaseCurrency component use an injected one.

<BaseResultCurrentPrice :value="result" :format="'i.iii,ddd €'" />

Overriding default slot

<BaseResultCurrentPrice :result="result">
  <span class="custom-base-result-current-price">{{ result.price.value }}</span>