You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
spa_instat_tv/src/features/Price/index.tsx

39 lines
695 B

import { currencySymbols } from 'config'
import {
PriceAmount,
PriceDetails,
PriceWrapper,
Currency,
Period,
Divider,
PerPeriod,
} from './styled'
type Props = {
amount: number,
className?: string,
currency?: string,
perPeriod?: string | null,
}
export const Price = ({
amount,
className,
currency = currencySymbols.RUB,
perPeriod,
}: Props) => (
<PriceWrapper className={className}>
<PriceAmount>{amount}</PriceAmount>
<PriceDetails>
<Currency>{currency}</Currency>
{
perPeriod && (
<Period>
<Divider /><PerPeriod t={perPeriod} />
</Period>
)
}
</PriceDetails>
</PriceWrapper>
)