Discount2Badge
released version: 1.4.0
Usage
import { CarmoreIcon } from '@o2-ui/carmore-icon';
// ...
<CarmoreIcon icon={'discount-2-badge'} ... />
// ...
Size
Adjust the icon size with the width and height props.
- Pass numbers directly, or strings that include units such as 'px', 'rem', or '%'.
- (The original aspect ratio is fixed and cannot be changed.)
- The default
widthis '1.5rem'. - The default
heightis '1.5rem'.
<CarmoreIcon icon={'discount-2-badge'} ... /> // Uses the default ('1.5rem')
<CarmoreIcon icon={'discount-2-badge'} width={30} height={30} ... />
<CarmoreIcon icon={'discount-2-badge'} width={'48px'} height={'48px'} ... />
<CarmoreIcon icon={'discount-2-badge'} width={'5rem'} height={'5rem'} ... />
Color
Set className with a text color to change the icon color.
.text-red {
color: red;
}
.text-orange {
color: orange;
}
.text-green {
color: green;
}
.text-blue {
color: blue;
}
.text-purple {
color: purple;
}
<CarmoreIcon icon={'discount-2-badge'} className={'text-red'} ... />
<CarmoreIcon icon={'discount-2-badge'} className={'text-orange'} ... />
<CarmoreIcon icon={'discount-2-badge'} className={'text-green'} ... />
<CarmoreIcon icon={'discount-2-badge'} className={'text-blue'} ... />
<CarmoreIcon icon={'discount-2-badge'} className={'text-purple'} ... />
Accessibility (a11y)
We recommend setting accessibility attributes such as role and aria-label.
- The default
roleis 'img'. - The default
aria-labelis '할인 상품'. - Default accessibility props are provided, and you can customize them as needed.
- (Hover over the icon.)
<CarmoreIcon icon={'discount-2-badge'} ... /> // Uses the default ('할인 상품')
<CarmoreIcon icon={'discount-2-badge'} aria-label={'Discount products'} ... />