Skip to content

Commit 8f27b61

Browse files
lusanchristianalfoni
authored andcommitted
refactored content editor tabs (codesandbox#2881)
1 parent 13c6b7e commit 8f27b61

File tree

3 files changed

+243
-230
lines changed

3 files changed

+243
-230
lines changed

packages/app/src/app/pages/Sandbox/Editor/Content/Tabs/elements.js renamed to packages/app/src/app/pages/Sandbox/Editor/Content/Tabs/elements.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ export const TabsContainer = styled.div`
3333
}
3434
`;
3535

36+
interface IStyledPrettierIconProps {
37+
disabled?: boolean;
38+
}
3639
export const StyledPrettierIcon = styled(PrettierIcon)`
3740
transition: 0.3s ease opacity;
3841
width: 1.125rem;
@@ -47,7 +50,7 @@ export const StyledPrettierIcon = styled(PrettierIcon)`
4750
opacity: 1;
4851
}
4952
50-
${props =>
53+
${(props: IStyledPrettierIconProps) =>
5154
props.disabled &&
5255
css`
5356
opacity: 0;
@@ -71,6 +74,11 @@ export const Line = styled.div`
7174
props.theme['editorGroupHeader.tabsBorder'] || 'rgba(255, 255, 255, 0.3)'};
7275
`;
7376

77+
interface IIconWrapperProps {
78+
active?: boolean;
79+
disabled?: boolean;
80+
theme: any;
81+
}
7482
export const IconWrapper = styled.div`
7583
svg {
7684
transition: 0.3s ease opacity;
@@ -86,7 +94,7 @@ export const IconWrapper = styled.div`
8694
opacity: 1;
8795
}
8896
89-
${props =>
97+
${(props: IIconWrapperProps) =>
9098
props.active &&
9199
css`
92100
opacity: 1;

packages/app/src/app/pages/Sandbox/Editor/Content/Tabs/index.js

Lines changed: 0 additions & 228 deletions
This file was deleted.

0 commit comments

Comments
 (0)