File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,12 @@ const COMPONENT_CLASS = "c-link-card";
2222
2323export interface LinkCardProps {
2424 children : any ;
25+ iconType ?: Icons ;
2526 includeIcon ?: boolean ;
2627 label : string ;
28+ onClick ?: ( ) => void ;
2729 to ?: any ;
2830 type ?: LinkCardTypes ;
29- onClick ?: ( ) => void ;
3031}
3132
3233// #endregion Interfaces
@@ -40,14 +41,15 @@ const LinkCard: React.FC<LinkCardProps> = (props: LinkCardProps) => {
4041 if ( props . includeIcon ) {
4142 cssClassNames . push ( "-with-icon" ) ;
4243 }
43- const cssClassNamesFlat = cssClassNames . join ( " " ) ;
4444
45+ const cssClassNamesFlat = cssClassNames . join ( " " ) ;
46+ const iconType = props . iconType ?? Icons . Lightbulb ;
4547 const type = props . type ?? LinkCardTypes . Link ;
4648
4749 const renderChildren = ( ) => (
4850 < React . Fragment >
4951 { // if
50- props . includeIcon && < Icon type = { Icons . Lightbulb } /> }
52+ props . includeIcon && < Icon type = { iconType } /> }
5153 < div className = { `${ COMPONENT_CLASS } __content` } >
5254 < Paragraph size = { ParagraphSizes . Small } >
5355 { props . children }
You can’t perform that action at this time.
0 commit comments