oman-currency
v1.0.0
Published
A React component for displaying the Omani Rial (OMR) currency symbol
Maintainers
Readme
oman-currency
A React component for displaying the Omani Rial (OMR) currency symbol in web applications.
Installation
npm install oman-currencyUsage
import { CurrencySymbol } from 'oman-currency';
export default function PriceDisplay() {
return (
<div className="flex items-center gap-2">
<CurrencySymbol size={1.2} />
<span className="text-2xl font-bold">1.500</span>
</div>
);
}Props
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| className | string | "" | Optional CSS class names for custom styling |
| color | string | "currentColor" | Color value for the symbol. Accepts any valid CSS color |
| size | number | 1 | Size multiplier. Dimensions: width = size × 1em, height = size × 0.75em |
| svgPath | string | "/RO.svg" | Custom path to SVG asset. Must be accessible from public directory |
Examples
Basic Usage
<CurrencySymbol />Custom Size
<CurrencySymbol size={1.5} />Custom Color
<CurrencySymbol color="#ff5733" size={1.2} />Custom SVG Path
<CurrencySymbol
size={1.2}
svgPath="/custom/path/RO.svg"
/>Requirements
- React 16.8.0 or higher
- The
RO.svgfile must be present in your application's public directory (or use thesvgPathprop to specify a custom location)
License
MIT
