Refactor icons passed as props with the new way (#1492)
* Refactor icons passed as props with the new way Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> * Update more files Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> * Fix according to review * Fix according to review * Fix according to review * Fix chromatic regressions --------- Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -119,7 +119,7 @@ export function CommandMenu() {
|
||||
key={cmd.label}
|
||||
to={cmd.to}
|
||||
label={cmd.label}
|
||||
icon={cmd.icon}
|
||||
Icon={cmd.Icon}
|
||||
shortcuts={cmd.shortcuts || []}
|
||||
onClick={cmd.onCommandClick}
|
||||
/>
|
||||
@ -132,7 +132,7 @@ export function CommandMenu() {
|
||||
key={matchingCreateCommand.label}
|
||||
to={matchingCreateCommand.to}
|
||||
label={matchingCreateCommand.label}
|
||||
icon={matchingCreateCommand.icon}
|
||||
Icon={matchingCreateCommand.Icon}
|
||||
shortcuts={matchingCreateCommand.shortcuts || []}
|
||||
onClick={matchingCreateCommand.onCommandClick}
|
||||
/>
|
||||
@ -155,14 +155,14 @@ export function CommandMenu() {
|
||||
to={`person/${person.id}`}
|
||||
label={person.displayName}
|
||||
key={person.id}
|
||||
icon={
|
||||
Icon={() => (
|
||||
<Avatar
|
||||
avatarUrl={null}
|
||||
size="sm"
|
||||
colorId={person.id}
|
||||
placeholder={person.displayName}
|
||||
colorId={person.id}
|
||||
type="rounded"
|
||||
/>
|
||||
}
|
||||
)}
|
||||
/>
|
||||
))}
|
||||
</StyledGroup>
|
||||
@ -174,14 +174,13 @@ export function CommandMenu() {
|
||||
to={`companies/${company.id}`}
|
||||
label={company.name}
|
||||
key={company.id}
|
||||
icon={
|
||||
Icon={() => (
|
||||
<Avatar
|
||||
avatarUrl={getLogoUrlFromDomainName(company.domainName)}
|
||||
size="sm"
|
||||
colorId={company.id}
|
||||
placeholder={company.name}
|
||||
/>
|
||||
}
|
||||
)}
|
||||
/>
|
||||
))}
|
||||
</StyledGroup>
|
||||
@ -193,7 +192,7 @@ export function CommandMenu() {
|
||||
onClick={() => openActivityRightDrawer(activity.id)}
|
||||
label={activity.title ?? ''}
|
||||
key={activity.id}
|
||||
icon={<IconNotes />}
|
||||
Icon={IconNotes}
|
||||
/>
|
||||
))}
|
||||
</StyledGroup>
|
||||
|
||||
Reference in New Issue
Block a user