Skip to content

Commit

Permalink
fix ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMarcMilletScality committed Dec 12, 2023
1 parent 21fe8b5 commit 0b45108
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/lib/components/card/Card.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import { HTMLProps } from 'react';
import { createContext } from 'react';
import styled from 'styled-components';
Expand All @@ -9,7 +10,7 @@ type CardElementProps = {
};

function withCompoundCheck(Component) {
return ({ children, className, rest }: CardElementProps) => (
return ({ children, className, ...rest }: CardElementProps) => (
<CardContext.Consumer>
{(value) => {
const componentName = Component.displayName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Container = styled.div`
`;
}}
`;
const ContainerProgress = styled.div`
const ContainerProgress = styled.div<{ percentage: number }>`
${(props) => {
return css`
animation-duration: 1s;
Expand Down
12 changes: 8 additions & 4 deletions src/lib/components/steppers/Steppers.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ const Panel = styled.div`
display: flex;
flex-direction: column;
`;
const Circle = styled.div`
const Circle = styled.div<{
error?: boolean;
completed?: boolean;
active?: boolean;
}>`
display: flex;
justify-content: center;
align-items: center;
Expand Down Expand Up @@ -71,7 +75,7 @@ const StepHeader = styled.span`
const StepContent = styled.div`
padding: ${spacing.r8};
`;
const BottomBar = styled.hr`
const BottomBar = styled.hr<{ completed?: boolean }>`
flex-grow: 1;
margin: 0;
border: none;
Expand All @@ -97,7 +101,7 @@ function Step(props: StepProps) {
active,
completed,
isLast,
index,
index = 0,
error,
inProgress,
} = props;
Expand All @@ -115,7 +119,7 @@ function Step(props: StepProps) {
{!isLast && <BottomBar completed={completed} />}
</Panel>
<Panel>
<StepHeader completed={completed}>{title}</StepHeader>
<StepHeader>{title}</StepHeader>
{active && <StepContent>{content}</StepContent>}
</Panel>
</StepContainer>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/text/Text.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const GentleEmphaseSecondaryText = styled(SecondaryText)<{

export const Text = styled.span<{
variant?: 'ChartTitle' | 'Basic' | 'Smaller' | 'Larger' | 'Large';
color?: CoreUITheme;
color?: keyof CoreUITheme;
isEmphazed?: boolean;
isGentleEmphazed?: boolean;
}>`
Expand Down

0 comments on commit 0b45108

Please sign in to comment.