fyndiq-component-price
v2.4.1
Published
Please use the `Price` element included in [`fyndiq-component-article`](https://github.com/fyndiq/fyndiq-ui/tree/master/packages/fyndiq-component-article)
Downloads
9
Keywords
Readme
OUTDATED
Please use the Price
element included in fyndiq-component-article
Migration Guide for the new element
fyndiq-component-price
A Price Component for Fyndiq
Installation
The component can be installed through NPM:
npm i -S fyndiq-component-price
Usage
import React from 'react'
import { Price, CurrentPrice, OldPrice } from 'fyndiq-component-price'
// Normal usage
<Price>
<CurrentPrice>129 kr</CurrentPrice>
<OldPrice>200 kr</OldPrice>
</Price>
// Use same font-size
<Price emphasize={false}>
<CurrentPrice>129 kr</CurrentPrice>
<OldPrice>200 kr</OldPrice>
</Price>
API
The component Price
has the following customizable props:
| Name | Type | Description | Default value |
|---|---|---|---|
| emphasize | Boolean | Use different font-sizes for current and old price | true
|