Skip to content

Commit

Permalink
fix: add custom fab fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Aug 30, 2023
1 parent 0c71a2d commit 168d093
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/components/layout/FloatingBtn.jsx
Original file line number Diff line number Diff line change
@@ -238,19 +238,21 @@ export default function FloatingButtons() {
<Save fontSize={iconSize} sx={{ color: 'white' }} />
</Fab>
)}
{fabButtons.custom.map((icon) => (
<Fab
key={`${icon.color}${icon.href}${icon.icon}`}
color={icon.color || 'secondary'}
size={fabSize}
href={icon.href}
referrerPolicy="no-referrer"
target={icon.target || '_blank'}
disabled={disabled}
>
<I className={icon.icon} size={iconSize} />
</Fab>
))}
{(Array.isArray(fabButtons.custom) ? fabButtons.custom : []).map(
(icon) => (
<Fab
key={`${icon.color}${icon.href}${icon.icon}`}
color={icon.color || 'secondary'}
size={fabSize}
href={icon.href}
referrerPolicy="no-referrer"
target={icon.target || '_blank'}
disabled={disabled}
>
<I className={icon.icon} size={iconSize} />
</Fab>
),
)}
</Stack>
)
}

0 comments on commit 168d093

Please # to comment.