diff --git a/core/styles/src/Menu.tsx b/core/styles/src/Menu.tsx index 75a7dbb1..954d42cb 100644 --- a/core/styles/src/Menu.tsx +++ b/core/styles/src/Menu.tsx @@ -95,7 +95,9 @@ const Label = styled.div` flex: 1; `; -const Item = styled.a` +const Item = styled.a.withConfig({ + shouldForwardProp: (prop) => !['active', 'checked'].includes(prop), +})` ${TYPO.regular} position: relative; height: ${SPACING(3.5)}px; diff --git a/core/styles/src/forms.tsx b/core/styles/src/forms.tsx index de4d0db7..4186535e 100644 --- a/core/styles/src/forms.tsx +++ b/core/styles/src/forms.tsx @@ -154,7 +154,9 @@ type ButtonProps = { highlight?: boolean; }; -export const Button = styled.button` +export const Button = styled.button.withConfig({ + shouldForwardProp: (prop) => prop !== 'highlight', +})` ${TYPO.regular} display: flex; align-items: center; diff --git a/plugins/timeline/src/Timeline.tsx b/plugins/timeline/src/Timeline.tsx index 4d775639..a640edc6 100644 --- a/plugins/timeline/src/Timeline.tsx +++ b/plugins/timeline/src/Timeline.tsx @@ -20,13 +20,13 @@ import ValuePopup from './ValuePopup'; import { formatTime } from './utils'; type ContainerProps = { - show: boolean; + $show: boolean; }; const Container = styled.div` display: flex; flex-direction: column; - height: ${(props) => (props.show ? '40vh' : `${SPACING(2)}px`)}; + height: ${(props) => (props.$show ? '40vh' : `${SPACING(2)}px`)}; min-height: 0; ${BREAKPOINTS.max.medium` @@ -49,7 +49,7 @@ const Header = styled.div` `; type ArrowProps = { - show: boolean; + $show: boolean; }; const Arrow = styled.div` @@ -117,13 +117,13 @@ const ZoomControls = styled.div` `; type ZoomControlProps = { - active: boolean; + $active: boolean; }; const ZoomControl = styled.div` display: flex; - opacity: ${(props) => (props.active ? 1 : 0.2)}; - cursor: ${(props) => (props.active ? 'pointer' : 'default')}; + opacity: ${(props) => (props.$active ? 1 : 0.2)}; + cursor: ${(props) => (props.$active ? 'pointer' : 'default')}; `; const SidebarRows = styled.div` @@ -199,7 +199,9 @@ type ButtonProps = { onClick?: () => void; }; -const Button = styled(Tooltip)` +const Button = styled(Tooltip).withConfig({ + shouldForwardProp: (prop) => prop !== 'active', +})` position: relative; width: 26px; height: 26px; @@ -283,14 +285,14 @@ const Timeline = ({ timeline }: TimelineProps) => { }, [playing, show, timeline]); return ( - +
{ timeline.show.set(!show); }} > Timeline - + { {Math.round(zoom * 100)}% - 0}> + 0}> { }} /> - +