Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lottie icons 2408 (Milestone 3) #2565

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
82458af
Revert caret.ts test to original state after debugging modifications.
ohrytskov Nov 7, 2024
f017a16
Add waitForSelector utility and integrate into caret.ts test.
ohrytskov Nov 8, 2024
d51013a
Set default icon size of 18 for all components without explicit size.
ohrytskov Nov 8, 2024
21daac8
Adjust default icon sizes to 18 for NewSubthought, NewThought, and So…
ohrytskov Nov 8, 2024
934fdd3
Adjust default size of TextColorWithColorPicker to 18
ohrytskov Nov 8, 2024
ad4ef97
Update ToolbarButton padding to center buttons vertically.
ohrytskov Nov 8, 2024
a45a9f6
Improve ToolbarButton padding for vertical centering and enhanced cli…
ohrytskov Nov 9, 2024
aba6e23
Enhance LottieAnimation component with color customization and improv…
ohrytskov Nov 10, 2024
c043b76
Implement theme-based color customization and improve documentation.
ohrytskov Nov 10, 2024
7359a47
Improve JSDoc comments for LottieAnimation component.
ohrytskov Nov 11, 2024
ff3cd33
Refactor AnimatedIcon and LottieAnimation for dynamic theme-based col…
ohrytskov Nov 11, 2024
e59e9bd
Puppeteer: update snapshots.
ohrytskov Nov 11, 2024
435e41c
Merge main branch.
ohrytskov Nov 12, 2024
ef16897
Improve color handling for animations in LottieAnimation and remove u…
ohrytskov Nov 12, 2024
ae442ad
Refactor: Move color manipulation functions outside LottieAnimation c…
ohrytskov Nov 13, 2024
4b8b00d
Merge main branch.
ohrytskov Nov 13, 2024
ea19c46
Refactor: Calculate dynamic color during render instead of using useE…
ohrytskov Nov 13, 2024
a10cb99
Add scaling for left and right arrow icons and optimize toolbar butto…
ohrytskov Nov 14, 2024
3a287b9
Refactor Toolbar and Triangle components to support dynamic arrow pad…
ohrytskov Nov 14, 2024
6123396
Refactor AnimatedIcon: replace custom rgbToHex function with @mui/mat…
ohrytskov Nov 15, 2024
661f1cb
Integrate LottieData type definitions and refine component type handl…
ohrytskov Nov 15, 2024
8f39dcc
Enhance Lottie animation data handling with immutability and memoizat…
ohrytskov Nov 15, 2024
57e0af5
Merge main branch.
ohrytskov Nov 15, 2024
71c42b3
Puppeteer: update snapshots.
ohrytskov Nov 15, 2024
496e269
Set the style properties to 100% width and height for the LottieAnima…
ohrytskov Nov 15, 2024
c67735d
Add a horizontal translate transformation to position ItalicTextIcon …
ohrytskov Nov 15, 2024
30a0c0e
Add optional chaining in dynamicColor calculation to prevent errors d…
ohrytskov Nov 15, 2024
6ee8afd
Puppeteer: update snapshots.
ohrytskov Nov 16, 2024
da9058f
Update ItalicTextIcon to include scaling transformation.
ohrytskov Nov 19, 2024
98b4327
Merge main branch.
ohrytskov Nov 19, 2024
a6aab79
Puppeteer: update snapshots.
ohrytskov Nov 19, 2024
ab9beb7
Refactor: Use window.getComputedStyle for dynamic color calculation.
ohrytskov Nov 19, 2024
37070c0
Refactor types: split LottieTypes into separate files in lottie direc…
ohrytskov Nov 20, 2024
bbba58a
Refactor hex color to RGBA conversion using Material-UI hexToRgb.
ohrytskov Nov 20, 2024
dd1a309
Adjust SVG transform styles in IndentIcon and OutdentIcon for better …
ohrytskov Nov 20, 2024
e3bf2a4
Dynamically calculate sizes for undo and redo icons based on font size.
ohrytskov Nov 20, 2024
37089f8
Puppeteer: update snapshots.
ohrytskov Nov 20, 2024
530d90c
Change transform translate values from pixels to percentages in Inden…
ohrytskov Nov 21, 2024
9b57a5f
Update ColorProperty.k type to only include RGBA and AnimationKeyfram…
ohrytskov Nov 21, 2024
01de6df
Rename lottieColor to defaultColor in AnimatedIcon component.
ohrytskov Nov 23, 2024
f8842ab
Add transform styles to icon SVGs for consistent scaling and position…
ohrytskov Nov 23, 2024
6e80deb
Update transform styles of icon SVGs to adjust scaling and positionin…
ohrytskov Nov 23, 2024
014b96d
Refactor ColorProperty to distinguish between static and animated col…
ohrytskov Nov 23, 2024
ecfc627
Refactor hexToRGBA return type to RGBA.
ohrytskov Nov 25, 2024
2311972
Puppeteer: update snapshots.
ohrytskov Nov 25, 2024
c4b378c
Refactor ColorProperty types and update color handling.
ohrytskov Nov 25, 2024
912d44a
Merge main branch.
ohrytskov Nov 25, 2024
be4d8ed
Puppeteer: update snapshots.
ohrytskov Nov 25, 2024
95b8ac5
Merge main branch.
ohrytskov Nov 26, 2024
cd88bd3
Puppeteer: update snapshots.
ohrytskov Nov 26, 2024
8e56da0
Refactor AnimatedIcon: Simplify useSelector call for isLightTheme.
ohrytskov Nov 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/@types/AnimatedIconType.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { ReactNode } from 'react'
import IconType from './IconType'
import LottieData from './lottie/LottieData'

interface AnimatedIconType extends IconType {
animationData?: object
animationData?: LottieData | null
children?: ReactNode
}
Comment on lines 5 to 8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is only used in AnimatedIcon.tsx, we can move it to that module. Or even better, remove it completely and just type the props inline.


Expand Down
13 changes: 13 additions & 0 deletions src/@types/lottie/AnimationKeyframe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* AnimationKeyframe Interface.
*
* Defines the structure for keyframes in animations, including optional tangents.
*/
interface AnimationKeyframe {
i?: { x: number[]; y: number[] } // In tangents
o?: { x: number[]; y: number[] } // Out tangents
t: number // Time
s: number[] // Values
}
Comment on lines +6 to +11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a minor point, but I recommend using JSDOC comments for property descriptions. This allows them to show up in the contextual information in VS Code Intellisense and other editors.

interface AnimationKeyframe {
	/** In tangents **/
  i?: { x: number[]; y: number[] }
	/** Out tangents **/
  o?: { x: number[]; y: number[] }
	/** Time **/
  t: number
	/** Values **/
  s: number[]
}


export default AnimationKeyframe
15 changes: 15 additions & 0 deletions src/@types/lottie/ColorProperty.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import AnimationKeyframe from './AnimationKeyframe'
import RGBA from './RGBA'

/**
* ColorProperty Interface.
*
* Defines color properties for shape items, allowing static colors,
* animated colors, and keyframe animations.
*/
interface ColorProperty {
a: number
k: RGBA | RGBA[] | number[] | AnimationKeyframe[]
}

export default ColorProperty
16 changes: 16 additions & 0 deletions src/@types/lottie/KeyframeShape.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* KeyframeShape Interface.
*
* Defines keyframe data for shapes, including in/out tangents and values.
*/
interface KeyframeShape {
a: number
k: {
i: number[][]
o: number[][]
v: number[][]
c: boolean
}
}

export default KeyframeShape
12 changes: 12 additions & 0 deletions src/@types/lottie/LottieData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import ShapeLayer from './ShapeLayer'

/**
* LottieData Interface.
*
* The main interface for Lottie data, comprising multiple layers.
*/
interface LottieData {
layers: ShapeLayer[] // Main layers array, which may contain various types
}

export default LottieData
17 changes: 17 additions & 0 deletions src/@types/lottie/NestedShape.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import KeyframeShape from './KeyframeShape'

/**
* NestedShape Interface.
*
* Represents a nested shape within a shape group, allowing for hierarchical structures.
*/
interface NestedShape {
ind?: number
ty: string
ix?: number
ks?: KeyframeShape
nm?: string
[key: string]: unknown // Permit additional properties
}

export default NestedShape
7 changes: 7 additions & 0 deletions src/@types/lottie/RGBA.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* RGBA Color Representation.
*
* Represents a color using Red, Green, Blue, and Alpha (transparency) channels.
*/
type RGBA = [number, number, number, number]
export default RGBA
20 changes: 20 additions & 0 deletions src/@types/lottie/ShapeItem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import ColorProperty from './ColorProperty'
import KeyframeShape from './KeyframeShape'
import NestedShape from './NestedShape'

/**
* ShapeItem Interface.
*
* Represents a single shape item in a Lottie animation, which can have colors, nested shapes,
* keyframe animations, and additional properties.
*/
interface ShapeItem {
ty: string
c?: ColorProperty
it?: ShapeItem[] | NestedShape[] // Allow additional shape structures
ks?: KeyframeShape // Optional keyframe data
nm?: string
[key: string]: unknown // Permit extra properties
}

export default ShapeItem
15 changes: 15 additions & 0 deletions src/@types/lottie/ShapeLayer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import NestedShape from './NestedShape'
import ShapeItem from './ShapeItem'

/**
* ShapeLayer Interface.
*
* Represents a layer that can contain multiple shapes and other properties for Lottie animations.
*/
interface ShapeLayer {
ty: number
shapes?: (ShapeItem | NestedShape)[] // Combine both types for flexibility
[key: string]: unknown // Allow for any additional properties
}

export default ShapeLayer
6 changes: 4 additions & 2 deletions src/components/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const Alert: FC = () => {
const value = strip(alertStoreValue ?? alert?.value ?? '')
const undoEnabled = useSelector(isUndoEnabled)
const redoEnabled = useSelector(state => state.redoPatches.length > 0)
const fontSize = useSelector(state => state.fontSize)
const iconSize = 0.78 * fontSize

/** Dismiss the alert on close. */
const onClose = useCallback(() => {
Expand All @@ -45,7 +47,7 @@ const Alert: FC = () => {
})}
>
<UndoIcon
size={14}
size={iconSize}
fill={token('colors.bg')}
cssRaw={css.raw({ position: 'relative', top: '0.25em', right: '0.25em' })}
/>
Expand All @@ -59,7 +61,7 @@ const Alert: FC = () => {
>
Redo
<RedoIcon
size={14}
size={iconSize}
fill={token('colors.bg')}
cssRaw={css.raw({ position: 'relative', top: '0.25em', left: '0.25em' })}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './icons/AnimatedIcon'
import animationData from './icons/animations/12-search.json'

/** Search Icon with Conditional Lottie Animation. */
const SearchIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const SearchIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
7 changes: 6 additions & 1 deletion src/components/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const arrow = cva({
base: {
position: 'absolute',
fontSize: '80%',
paddingTop: '16px',
paddingTop: '15px',
verticalAlign: 'middle',
color: 'gray66',
backgroundColor: 'bg',
Expand Down Expand Up @@ -77,6 +77,9 @@ const arrow = cva({
],
})

/** Calculates the top padding for vertically centering toolbar arrows. */
const calculatePaddingTop = (fontSize: number) => Math.floor(0.3 * fontSize + 11.6)

/** Toolbar component. */
const Toolbar: FC<ToolbarProps> = ({ customize, onSelect, selected }) => {
const dispatch = useDispatch()
Expand Down Expand Up @@ -230,6 +233,7 @@ const Toolbar: FC<ToolbarProps> = ({ customize, onSelect, selected }) => {
<div>
<span
id='left-arrow'
style={{ paddingTop: `${calculatePaddingTop(fontSize)}px` }}
className={arrow({ direction: 'left', isHidden: !leftArrowIsShown, fixed: !customize })}
>
<TriangleLeft width={arrowWidth} height={fontSize} fill={token('colors.gray50')} />
Expand Down Expand Up @@ -275,6 +279,7 @@ const Toolbar: FC<ToolbarProps> = ({ customize, onSelect, selected }) => {

<span
id='right-arrow'
style={{ paddingTop: `${calculatePaddingTop(fontSize)}px` }}
className={arrow({ direction: 'right', isHidden: !rightArrowIsShown, fixed: !customize })}
>
<TriangleRight width={arrowWidth} height={fontSize} fill={token('colors.gray50')} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/ToolbarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const ToolbarButton: FC<ToolbarButtonProps> = ({
toolbarPointerEvents({ override: true }),
css({
display: 'inline-block',
padding: '15px 8px 5px 8px',
padding: '14px 8px 5px 8px',
borderRadius: '3px',
zIndex: 'stack',
// animate maxWidth to avoid having to know the exact width of the toolbar icon
Expand Down
4 changes: 2 additions & 2 deletions src/components/TriangleLeft.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { css } from '../../styled-system/css'
import { token } from '../../styled-system/tokens'
import Icon from '../@types/IconType'
import IconType from '../@types/IconType'

/** A left-facing svg triangle. */
const TriangleLeft = ({ fill = token('colors.bg'), size = 20, width, height, style, cssRaw }: Icon) => (
const TriangleLeft = ({ fill = token('colors.bg'), size = 20, width, height, style, cssRaw }: IconType) => (
<svg
xmlns=''
version='1.1'
Expand Down
4 changes: 2 additions & 2 deletions src/components/TriangleRight.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { css } from '../../styled-system/css'
import { token } from '../../styled-system/tokens'
import Icon from '../@types/IconType'
import IconType from '../@types/IconType'

/** A right-facing triangle component. */
const TriangleRight = ({ fill = token('colors.bg'), size = 20, width, height, style, cssRaw }: Icon) => (
const TriangleRight = ({ fill = token('colors.bg'), size = 20, width, height, style, cssRaw }: IconType) => (
<svg
xmlns=''
version='1.1'
Expand Down
20 changes: 19 additions & 1 deletion src/components/icons/AnimatedIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { rgbToHex } from '@mui/material'
import { useRef } from 'react'
import { useSelector } from 'react-redux'
import { css, cx } from '../../../styled-system/css'
import { icon } from '../../../styled-system/recipes'
import { token } from '../../../styled-system/tokens'
import AnimatedIconType from '../../@types/AnimatedIconType'
import { ICON_SCALING_FACTOR } from '../../constants'
import theme from '../../selectors/theme'
import LottieAnimation from './LottieAnimation'

/** Animated Icon with Conditional Lottie Animation. */
Expand All @@ -16,11 +20,21 @@ const AnimatedIcon = ({
children,
animationComplete,
}: AnimatedIconType) => {
const isLightTheme = useSelector(state => theme(state) === 'Light')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a minor suggestion based on my opinion, not a required change.

Suggested change
const isLightTheme = useSelector(state => theme(state) === 'Light')
const isLightTheme = useSelector(theme) === 'Light'

It would be even nicer to make a separate selector (I use a convention of starting every selector name with get), like:

Suggested change
const isLightTheme = useSelector(state => theme(state) === 'Light')
const isLightTheme = useSelector(getIsLightTheme)

@raineorshine -- A little refactoring to add more selectors (and maybe switch to the get___ convention) might be worth considering at some point.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. Personally I don't love prefixing with get as I don't find it adds any semantic value, but I see the practical use in differentiating the selector from the local variable.

The logic is so minimal here, that factoring out getIsLightTheme just to abstract out the === sign is arguably not worth the effort, but it's a close call. With even the slightest bit more complexity I would be inclined to factor it out.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've improved AnimatedIcon by simplifying the useSelector call for isLightTheme.

const lottieColor = isLightTheme ? '#000000' : '#FFFFFF'
const newSize = size * ICON_SCALING_FACTOR
const color = style.fill || fill || token('colors.fg')

// Create a ref to the parent div
const divRef = useRef<HTMLDivElement | null>(null)

// Calculate dynamic color directly
const computedStyle = divRef.current ? window.getComputedStyle(divRef.current) : null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

window.getComputedStyle forces a layout calculation and thus has performance implications, so we should not access it in a React render function. More generally, we should probably never access DOM elements directly in a React render function.

Is there a different way to accomplish this? It's not very idiomatic in React to use the DOM as the source of truth. Is there any way we can get the desired color from the Redux state?

const dynamicColor = computedStyle?.color ? rgbToHex(computedStyle.color) : lottieColor

return (
<div
ref={divRef}
className={cx(icon(), css(cssRaw))}
style={{
...style,
Expand All @@ -30,7 +44,11 @@ const AnimatedIcon = ({
display: 'inline-flex',
}}
>
{animated ? <LottieAnimation animationData={animationData} onComplete={animationComplete} /> : children}
{animated ? (
<LottieAnimation animationData={animationData || null} onComplete={animationComplete} color={dynamicColor} />
) : (
children
)}
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/ArchiveIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/22-trash_3.json'

/** Archive Icon with Conditional Lottie Animation. */
const ArchiveIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const ArchiveIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/BackIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/06-back.json'

/** Back Icon with Conditional Lottie Animation. */
const BackIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const BackIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/BoldTextIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/13-bold_4.json'

/** Bold Text Icon with Conditional Lottie Animation. */
const BoldTextIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const BoldTextIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/BumpThoughtDownIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/14-bump-thought-down_2.json'

/** Bump Thought Down Icon with Conditional Lottie Animation. */
const BumpThoughtDownIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const BumpThoughtDownIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/Check.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/12-mark-as-done_3.json'

/** Check Icon Component used for toggleDone with Conditional Lottie Animation. */
const CheckIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const CheckIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/ClearThoughtIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/25-clear-thought.json'

/** Clear Thought Icon with Conditional Lottie Animation. */
const ClearThoughtIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const ClearThoughtIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/CollapseIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/26-collaps_2.json'

/** Collapse Icon with Conditional Lottie Animation. */
const CollapseIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const CollapseIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/CommandPaletteIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/27-command-palette.json'

/** CommandPalette Icon with Conditional Lottie Animation. */
const CommandPaletteIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const CommandPaletteIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/ContextViewIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/18-context-view_3.json'

/** Context View Icon with Conditional Lottie Animation. */
const ContextViewIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const ContextViewIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/ConvertToNoteIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/24-convert-to-note.json'

/** Convert To Note Icon with Conditional Lottie Animation. */
const ConvertToNoteIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const ConvertToNoteIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/DeleteIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/31-parmanently-delete_2.json'

/** Delete Icon with Conditional Lottie Animation. */
const DeleteIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const DeleteIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/DeviceIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AnimatedIcon from './AnimatedIcon'
import animationData from './animations/26-device-management_2.json'

/** Device Icon with Conditional Lottie Animation. */
const DeviceIcon = ({ fill, size, style = {}, cssRaw, animated, animationComplete }: IconType) => {
const DeviceIcon = ({ fill, size = 18, style = {}, cssRaw, animated, animationComplete }: IconType) => {
return (
<AnimatedIcon {...{ fill, size, style, cssRaw, animated, animationData, animationComplete }}>
<svg
Expand Down
Loading