Skip to content

Commit

Permalink
Merge pull request #50 from brainstormforce/STAR-993-improvement
Browse files Browse the repository at this point in the history
STAR-993 - improvement points
  • Loading branch information
vrundakansara authored Apr 5, 2024
2 parents 31c6902 + 3fce6c3 commit 71f2ffc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions src/logo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ import React from 'react';
// Internal Dependencies.
import './style.scss';

const Logo = ( { className, text, src, alt, onClick, href } ) => {
const Logo = ( { className, text, src, alt, onClick, href, extraText } ) => {
if ( ! text && ! src ) {
return '';
}

return (
<span
className={ `stc-logo ${ className ? className : '' }` }
className={ `stc-logo ${ className ? className : '' }${
extraText ? 'stc-extra-text' : ''
}` }
{ ...( extraText ? { 'data-extraText': extraText } : {} ) }
onClick={ ( event ) => {
if ( 'function' === typeof onClick ) {
onClick( event );
Expand Down
3 changes: 3 additions & 0 deletions src/toggle-dropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const ToggleDropdown = ( {
value,
onClick,
icon,
dismissAiPopup,
} ) => {
const [ state, setState ] = useState( {
option: {
Expand Down Expand Up @@ -65,6 +66,7 @@ const ToggleDropdown = ( {
<div
className="stc-toggle-dropdown-selected"
onClick={ () => {
dismissAiPopup();
setToggle( ! toggle );
} }
>
Expand Down Expand Up @@ -113,6 +115,7 @@ const ToggleDropdown = ( {
<Logo
text={ option.title }
src={ option.image }
extraText={ option.extraText }
/>
) : (
option.title
Expand Down

0 comments on commit 71f2ffc

Please sign in to comment.