-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feat) O3-4161: Add a Report icon to the CarbonMRS icon pack (#1194)
* O3-4161 Adding the Report Icon to the CarbonMRS Framework * Update API.md
- Loading branch information
Showing
4 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
533e15d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have managed to come up with this. **
/ @category Icons */
import React, { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';
import classNames, { type Argument } from 'classnames';
import style from './icons.module.scss';
export type IconProps = {
className?: Argument;
fill?: string;
size?: number;
};
/**
*/
export const ActivityIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ActivityIcon(props, ref) {
return ;
}),
);
/**
*/
export const AddIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function AddIcon(props, ref) {
return ;
}),
);
/**
*/
export const ArrowDownIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ArrowDownIcon(props, ref) {
return ;
}),
);
/**
*/
export const ArrowLeftIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ArrowLeftIcon(props, ref) {
return ;
}),
);
/**
*/
export const ArrowRightIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ArrowRightIcon(props, ref) {
return ;
}),
);
/**
*/
export const ArrowUpIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ArrowUpIcon(props: IconProps, ref) {
return ;
}),
);
/**
*/
export const BabyIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function BabyIcon(props: IconProps, ref) {
return ;
}),
);
/**
*/
export const CalendarHeatMapIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function CalendarHeatMap(props: IconProps, ref) {
return ;
}),
);
/**
*/
export const CalendarIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function Calendar(props: IconProps, ref) {
return ;
}),
);
/**
*/
export const CaretDownIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function CaretDownIcon(props: IconProps, ref) {
return ;
}),
);
/**
*/
export const CaretLeftIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function CaretLeftIcon(props: IconProps, ref) {
return ;
}),
);
/**
*/
export const CaretRightIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function CaretRightIcon(props: IconProps, ref) {
return ;
}),
);
/**
*/
export const CaretUpIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function CaretUpIcon(props: IconProps, ref) {
return ;
}),
);
/**
*/
export const CheckmarkFilledIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function CheckmarkFilledIcon(props, ref) {
return ;
}),
);
/**
*/
export const CheckmarkOutlineIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function CheckmarkOutlineIcon(props, ref) {
return ;
}),
);
/**
*/
export const ChartAverageIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ChartAverageIcon(props, ref) {
return ;
}),
);
/**
*/
export const ChemistryIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ChemistryIcon(props, ref) {
return ;
}),
);
/**
*/
export const ChevronDownIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ChevronDownIcon(props, ref) {
return ;
}),
);
/**
*/
export const ChevronLeftIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ChevronLeftIcon(props, ref) {
return ;
}),
);
/**
*/
export const ChevronRightIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ChevronRightIcon(props, ref) {
return ;
}),
);
/**
*/
export const ChevronUpIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ChevronUpIcon(props, ref) {
return ;
}),
);
/**
*/
export const CloseFilledIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function CloseFilledIcon(props, ref) {
return ;
}),
);
/**
*/
export const CloseOutlineIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function CloseOutlineIcon(props, ref) {
return ;
}),
);
/**
*/
export const CloseIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function CloseIcon(props, ref) {
return ;
}),
);
/**
*/
export const DocumentAttachmentIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function DocumentAttachmentIcon(props: IconProps, ref) {
return ;
}),
);
/**
*/
export const DocumentIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function DocumentIcon(props: IconProps, ref) {
return ;
}),
);
/**
*/
export const DownloadIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function DownloadIcon(props, ref) {
return ;
}),
);
/**
*/
export const EditIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function EditIcon(props, ref) {
return ;
}),
);
/**
*/
export const EventScheduleIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function EventScheduleIcon(props, ref) {
return ;
}),
);
/**
*/
export const EventsIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function EventsIcon(props, ref) {
return ;
}),
);
/**
*/
export const GroupIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function GroupIcon(props, ref) {
return ;
}),
);
/**
*/
export const GroupAccessIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function GroupAccessIcon(props, ref) {
return ;
}),
);
/**
*/
export const HospitalBedIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function HospitalBedIcon(props, ref) {
return ;
}),
);
/**
*/
export const ImageMedicalIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ImageMedicalIcon(props, ref) {
return ;
}),
);
/**
*/
export const InventoryManagementIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function InventoryManagementIcon(props, ref) {
return ;
}),
);
/**
*/
export const InformationIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function InformationIcon(props, ref) {
return ;
}),
);
/**
*/
export const InformationFilledIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function InformationFilledIcon(props, ref) {
return ;
}),
);
/**
*/
export const InformationSquareIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function InformationSquareIcon(props, ref) {
return ;
}),
);
/**
*/
export const ListCheckedIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ListCheckedIcon(props, ref) {
return ;
}),
);
/**
*/
export const LocationIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function LocationIcon(props, ref) {
return ;
}),
);
/**
*/
export const MaximizeIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function MaximizeIcon(props, ref) {
return ;
}),
);
/**
*/
export const MedicationIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function MedicationIcon(props, ref) {
return ;
}),
);
/**
*/
export const MessageQueueIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function MessageQueueIcon(props, ref) {
return ;
}),
);
/**
*/
export const MicroscopeIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function MicroscopeIcon(props, ref) {
return ;
}),
);
/**
*/
export const MoneyIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function MoneyIcon(props, ref) {
return ;
}),
);
/**
*/
export const MotherIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function MotherIcon(props, ref) {
return ;
}),
);
/**
*/
export const MovementIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function MovementIcon(props, ref) {
return ;
}),
);
/**
*/
export const OverflowMenuHorizontalIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function OverflowMenuHorizontalIcon(props, ref) {
return ;
}),
);
/**
*/
export const OverflowMenuVerticalIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function OverflowMenuVerticalIcon(props, ref) {
return ;
}),
);
/**
*/
export const PedestrianFamilyIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function PedestrianFamilyIcon(props, ref) {
return ;
}),
);
/**
*/
export const PenIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function PenIcon(props, ref) {
return ;
}),
);
/**
*/
export const PrinterIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function PrinterIcon(props, ref) {
return ;
}),
);
/**
*/
export const RenewIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function RenewIcon(props, ref) {
return ;
}),
);
/**
*/
export const ResetIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ResetIcon(props, ref) {
return ;
}),
);
/**
*/
export const TranslateIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function TranslateIcon(props, ref) {
return ;
}),
);
/**
*/
export const SaveIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function SaveIcon(props, ref) {
return ;
}),
);
/**
*/
export const SearchIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function SearchIcon(props, ref) {
return ;
}),
);
/**
*/
export const SwitcherIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function SwitcherIcon(props, ref) {
return ;
}),
);
/**
*/
export const ShoppingCartIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ShoppingCartIcon(props, ref) {
return ;
}),
);
/**
*/
export const ShoppingCartArrowDownIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ShoppingCartArrowDownIcon(props, ref) {
return ;
}),
);
/**
*/
export const StickyNoteAddIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function StickyNoteAddIcon(props, ref) {
return ;
}),
);
/**
*/
export const TableOfContentsIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function TableOfContentsIcon(props, ref) {
return ;
}),
);
/**
*/
export const TableIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function TableIcon(props, ref) {
return ;
}),
);
/**
*/
export const TimeIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function TimeIcon(props, ref) {
return ;
}),
);
/**
*/
export const ToolsIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ToolsIcon(props, ref) {
return ;
}),
);
/**
*/
export const TrashCanIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function TrashCanIcon(props, ref) {
return ;
}),
);
/**
*/
export const TreeViewAltIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function TreeViewAltIcon(props, ref) {
return ;
}),
);
/**
*/
export const UserAvatarIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function UserAvatarIcon(props, ref) {
return ;
}),
);
/**
*/
export const UserFollowIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function UserFollowIcon(props, ref) {
return ;
}),
);
/**
*/
export const UserXrayIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function UserXrayIcon(props, ref) {
return ;
}),
);
export const PasswordIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function PasswordIcon(props, ref) {
return ;
}),
);
/**
*/
export const UserIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function UserIcon(props, ref) {
return ;
}),
);
/**
*/
export const ViewOffIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ViewOffIcon(props, ref) {
return ;
}),
);
/**
*/
export const ViewIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ViewIcon(props, ref) {
return ;
}),
);
/**
*/
export const WarningIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function WarningIcon(props, ref) {
return ;
}),
);
/**
*/
export const ReportIcon = memo(
forwardRef<SVGSVGElement, IconProps>(function ReportIcon(props, ref) {
return ;
}),
);
// Icon aliases that are a little more aligned to specific use-cases
// should all resolve to a defined React icon
/**
*/
export const AllergiesIcon = WarningIcon;
/**
*
*/
export const AttachmentIcon = DocumentAttachmentIcon;
/**
*/
export const ConditionsIcon = ListCheckedIcon;
/**
*
*/
export const RadiologyIcon = ImageMedicalIcon;
/**
*/
export const ShoppingCartAddItemIcon = ShoppingCartArrowDownIcon;
export type SvgIconProps = {
icon: string;
iconProps: IconProps;
};
/**
This is a utility type for custom icons that use the svg-sprite-loader to bundle custom icons
*/
export const Icon = memo(
forwardRef<SVGSVGElement, SvgIconProps>(function Icon({ icon, iconProps }, ref) {
let { className, fill, size } = Object.assign({}, { fill: 'currentColor', size: 20 }, iconProps);
if (size <= 0 || size > 72) {
console.error(
Invalid size '${size}' specified for ${icon}. Defaulting to 20.
);size = 20;
}
const iconRef = useRef(null);
useImperativeHandle(ref, () => iconRef.current!);
useEffect(() => {
if (iconRef.current) {
if (fill !== 'currentColor') {
iconRef.current.style.setProperty('--omrs-icon-fill', fill);
}
}
}, []);
return (
<svg
ref={iconRef}
className={classNames('omrs-icon', style.icon, className)}
height={size}
width={size}
viewBox="0 0 16 16"
}),
);