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/Register/components/Price/index.tsx

32 lines
604 B

import React from 'react'
import { useLexicsStore } from 'features/LexicsStore'
import {
PriceWrapper,
PriceAmount,
PriceDetails,
} from './styled'
type Props = {
amount: number,
currency?: string,
perPeriod?: string,
}
export const Price = ({
amount,
currency = '₽',
perPeriod = 'month',
}: Props) => {
const { translate } = useLexicsStore()
const perPeriodTranslated = translate(perPeriod)
return (
<PriceWrapper>
<PriceAmount>{amount}</PriceAmount>
<PriceDetails>
{currency} / {perPeriodTranslated}
</PriceDetails>
</PriceWrapper>
)
}