Skip to content

🎥 Make videos programmatically with React

fix(inline-action): fix inline action color

Antoine Caronf18b599343fb
diff --git a/packages/cli/src/editor/components/InlineAction.tsx b/packages/cli/src/editor/components/InlineAction.tsx
index 128ada0b4b..3444875f12 100644
--- a/packages/cli/src/editor/components/InlineAction.tsx
+++ b/packages/cli/src/editor/components/InlineAction.tsx
@@ -1,6 +1,6 @@
import type {PropsWithChildren} from 'react';
import React, {useCallback, useMemo, useState} from 'react';
-import {CLEAR_HOVER, LIGHT_TEXT} from '../helpers/colors';
+import {CLEAR_HOVER, getBackgroundFromHoverState, LIGHT_TEXT} from '../helpers/colors';
import {useZIndex} from '../state/z-index';
export const InlineAction: React.FC<
@@ -24,14 +24,13 @@ export const InlineAction: React.FC<
const style: React.CSSProperties = useMemo(() => {
return {
border: 'none',
- background: hovered ? CLEAR_HOVER : 'transparent',
+ background: getBackgroundFromHoverState({ hovered, selected: false}),
height: 24,
width: 24,
display: 'inline-flex',
justifyContent: 'center',
alignItems: 'center',
borderRadius: 3,
- // TODO: Color does not get propagated to the children
color: hovered ? 'white' : LIGHT_TEXT,
};
}, [hovered]);