fix: Have an addIcon that adds to both ui and ui-next (#4490)
This commit is contained in:
1 parent
a5f03764d1
commit
4a125236dd
5 files changed
+24
No files matched your search
@@ -26,3 +26,8 @@ Find and replace
|
||||
@ohif/extension-default.panelModule.measurements
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## addIcon from ui
|
||||
|
||||
The addIcon from the ui package has had a version added in the default extension as
|
||||
`utils.addIcon` which adds to both `ui` and `ui-next`.
|
||||
@@ -2866,4 +2866,12 @@ export const Icons = {
|
||||
'icon-chevron-patient': (props: IconProps) => Icons.ChevronPatient(props),
|
||||
info: (props: IconProps) => Icons.Info(props),
|
||||
settings: (props: IconProps) => Icons.Settings(props),
|
||||
|
||||
/** Adds an icon to the set of icons */
|
||||
addIcon: (name: string, icon) => {
|
||||
if (Icons[name]) {
|
||||
console.warn('Replacing icon', name);
|
||||
}
|
||||
Icons[name] = icon;
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user