fix(#2404): added brazilian price into packages list popup
parent
fa2fe6c600
commit
ff1041bcb5
@ -0,0 +1,51 @@ |
||||
import { currencySymbols } from 'config' |
||||
|
||||
import { T9n } from 'features/T9n' |
||||
|
||||
import { |
||||
Prefix, |
||||
PriceAmount, |
||||
PriceDetails, |
||||
PriceWrapper, |
||||
Currency, |
||||
Period, |
||||
} from '../../styled' |
||||
|
||||
type Props = { |
||||
amount: number, |
||||
className?: string, |
||||
currency?: string, |
||||
isFrom?: boolean, |
||||
perPeriod?: string | null, |
||||
} |
||||
|
||||
export const BasePrice = ({ |
||||
amount, |
||||
className, |
||||
currency = currencySymbols.RUB, |
||||
isFrom, |
||||
perPeriod, |
||||
}: Props) => ( |
||||
<PriceWrapper className={className}> |
||||
{ |
||||
isFrom |
||||
? ( |
||||
<Prefix> |
||||
<T9n t='from_price' /> |
||||
</Prefix> |
||||
) |
||||
: '' |
||||
} |
||||
<PriceAmount>{amount}</PriceAmount> |
||||
<PriceDetails> |
||||
<Currency>{currency}</Currency> |
||||
{ |
||||
perPeriod && ( |
||||
<Period> |
||||
/ <T9n t={perPeriod} /> |
||||
</Period> |
||||
) |
||||
} |
||||
</PriceDetails> |
||||
</PriceWrapper> |
||||
) |
||||
@ -0,0 +1,51 @@ |
||||
import { currencySymbols } from 'config' |
||||
|
||||
import { T9n } from 'features/T9n' |
||||
|
||||
import { |
||||
Prefix, |
||||
PriceDetails, |
||||
PriceWrapper, |
||||
Currency, |
||||
Period, |
||||
} from '../../styled' |
||||
import { PriceAmount } from './styled' |
||||
|
||||
type Props = { |
||||
amount: number, |
||||
className?: string, |
||||
currency?: string, |
||||
isFrom?: boolean, |
||||
perPeriod?: string | null, |
||||
} |
||||
|
||||
export const BrazilianPrice = ({ |
||||
amount, |
||||
className, |
||||
currency = currencySymbols.BRL, |
||||
isFrom, |
||||
perPeriod, |
||||
}: Props) => ( |
||||
<PriceWrapper className={className}> |
||||
{ |
||||
isFrom |
||||
? ( |
||||
<Prefix> |
||||
<T9n t='from_price' /> |
||||
</Prefix> |
||||
) |
||||
: '' |
||||
} |
||||
<PriceDetails> |
||||
<Currency>{currency}</Currency> |
||||
<PriceAmount>{amount}</PriceAmount> |
||||
{ |
||||
perPeriod && ( |
||||
<Period> |
||||
/ <T9n t={perPeriod} /> |
||||
</Period> |
||||
) |
||||
} |
||||
</PriceDetails> |
||||
</PriceWrapper> |
||||
) |
||||
@ -0,0 +1,6 @@ |
||||
import styled from 'styled-components' |
||||
import { PriceAmount as BasePriceAmount } from '../../styled' |
||||
|
||||
export const PriceAmount = styled(BasePriceAmount)` |
||||
margin-right: 4px; |
||||
` |
||||
Loading…
Reference in new issue