mirror of
https://github.com/SomboChea/ui
synced 2024-11-24 15:04:27 +07:00
fix: remove ts ignore from some components
This commit is contained in:
parent
32f4389b73
commit
b1804d7644
@ -64,7 +64,6 @@ export default class App extends Component<{}, AppStateInterface> {
|
|||||||
const context = { isUserLoggedIn, packages, logoUrl, user, scope };
|
const context = { isUserLoggedIn, packages, logoUrl, user, scope };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
// @ts-ignore
|
|
||||||
<Container isLoading={isLoading}>
|
<Container isLoading={isLoading}>
|
||||||
{isLoading ? <Loading /> : <AppContextProvider value={context}>{this.renderContent()}</AppContextProvider>}
|
{isLoading ? <Loading /> : <AppContextProvider value={context}>{this.renderContent()}</AppContextProvider>}
|
||||||
{this.renderLoginModal()}
|
{this.renderLoginModal()}
|
||||||
|
@ -9,18 +9,20 @@ interface Props {
|
|||||||
modifiers?: null | undefined;
|
modifiers?: null | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface WrapperProps {
|
||||||
|
capitalize: boolean;
|
||||||
|
weight: string;
|
||||||
|
modifiers?: null;
|
||||||
|
}
|
||||||
|
|
||||||
const Wrapper = styled('div')`
|
const Wrapper = styled('div')`
|
||||||
font-weight: ${({ weight }) => {
|
font-weight: ${({ weight }: WrapperProps) => fontWeight[weight]};
|
||||||
// @ts-ignore
|
text-transform: ${({ capitalize }: WrapperProps) => (capitalize ? 'capitalize' : 'none')};
|
||||||
return fontWeight[weight];
|
${({ modifiers }: WrapperProps) => modifiers};
|
||||||
}};
|
|
||||||
text-transform: ${({ capitalize }) => (capitalize ? 'capitalize' : 'none')};
|
|
||||||
${({ modifiers }: Props) => modifiers && modifiers};
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Label: React.FC<Props> = ({ text = '', capitalize = false, weight = 'regular', ...props }) => {
|
const Label: React.FC<Props> = ({ text = '', capitalize = false, weight = 'regular', ...props }) => {
|
||||||
return (
|
return (
|
||||||
// @ts-ignore
|
|
||||||
<Wrapper capitalize={capitalize} weight={weight} {...props}>
|
<Wrapper capitalize={capitalize} weight={weight} {...props}>
|
||||||
{text}
|
{text}
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
|
@ -11,15 +11,18 @@ export const Content = styled('div')({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
interface ContainerProps {
|
||||||
|
isLoading: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export const Container = styled('div')`
|
export const Container = styled('div')`
|
||||||
&& {
|
&& {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
${props =>
|
${({ isLoading }: ContainerProps) =>
|
||||||
// @ts-ignore
|
isLoading &&
|
||||||
props.isLoading &&
|
|
||||||
css`
|
css`
|
||||||
${Content} {
|
${Content} {
|
||||||
background-color: #f5f6f8;
|
background-color: #f5f6f8;
|
||||||
|
@ -8,7 +8,6 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Spinner: React.FC<Props> = ({ size = 50, centered = false }) => (
|
const Spinner: React.FC<Props> = ({ size = 50, centered = false }) => (
|
||||||
// @ts-ignore
|
|
||||||
<Wrapper centered={centered}>
|
<Wrapper centered={centered}>
|
||||||
<Circular size={size} />
|
<Circular size={size} />
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user