File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11{
2- "version" : " 0.2.26 " ,
2+ "version" : " 0.2.27 " ,
33 "license" : " MIT" ,
44 "main" : " dist/index.js" ,
55 "typings" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { classNames } from '../utils';
55import { Text } from '../content' ;
66import { Icon , CloseOutline } from '../icon' ;
77import { useSeverityStyle } from './useSeverityStyle' ;
8- import { useSeverityIcon } from './useSeverityIcon ' ;
8+ import { getSeverityIcon } from './getSeverityIcon ' ;
99import { SeverityLevel } from '../types' ;
1010export interface AlertProps {
1111 variant : SeverityLevel ;
@@ -57,7 +57,7 @@ export const Alert = ({
5757 let variantStyle = useSeverityStyle ( variant ) ;
5858
5959 if ( ! icon && showIcon ) {
60- icon = useSeverityIcon ( variant ) ;
60+ icon = getSeverityIcon ( variant ) ;
6161 }
6262 return (
6363 < div
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ type IconOptions = {
1919 */
2020 filled ?: boolean ;
2121} ;
22- export function useSeverityIcon (
22+ export function getSeverityIcon (
2323 severity : SeverityLevel ,
2424 { filled } : IconOptions = { filled : true }
2525) {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { css } from '@emotion/core';
33import { NoticeConfig } from './types' ;
44import { Text } from '../content' ;
55import { useSeverityStyle } from '../alert/useSeverityStyle' ;
6- import { useSeverityIcon } from '../alert/useSeverityIcon ' ;
6+ import { getSeverityIcon } from '../alert/getSeverityIcon ' ;
77import { Icon , CloseOutline } from '../icon' ;
88import theme from '../theme' ;
99import { DEFAULT_EXPIRE_MS } from './constants' ;
@@ -38,6 +38,7 @@ export function Notice({
3838 return ( ) => clearTimeout ( timer ) ;
3939 }
4040 return ( ) => { } ; // Void function
41+ // eslint-disable-next-line react-hooks/exhaustive-deps
4142 } , [ ] ) ;
4243
4344 // Get the styles for the specific variant
@@ -64,7 +65,7 @@ export function Notice({
6465 }
6566 ` }
6667 >
67- { useSeverityIcon ( variant ) }
68+ { getSeverityIcon ( variant ) }
6869
6970 < Text elementType = "h5" textSize = "large" weight = "heavy" color = "inherit" >
7071 { title }
You can’t perform that action at this time.
0 commit comments