mirror of
https://github.com/SomboChea/ui
synced 2024-12-25 21:54:26 +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 };
|
||||
|
||||
return (
|
||||
// @ts-ignore
|
||||
<Container isLoading={isLoading}>
|
||||
{isLoading ? <Loading /> : <AppContextProvider value={context}>{this.renderContent()}</AppContextProvider>}
|
||||
{this.renderLoginModal()}
|
||||
|
@ -9,18 +9,20 @@ interface Props {
|
||||
modifiers?: null | undefined;
|
||||
}
|
||||
|
||||
interface WrapperProps {
|
||||
capitalize: boolean;
|
||||
weight: string;
|
||||
modifiers?: null;
|
||||
}
|
||||
|
||||
const Wrapper = styled('div')`
|
||||
font-weight: ${({ weight }) => {
|
||||
// @ts-ignore
|
||||
return fontWeight[weight];
|
||||
}};
|
||||
text-transform: ${({ capitalize }) => (capitalize ? 'capitalize' : 'none')};
|
||||
${({ modifiers }: Props) => modifiers && modifiers};
|
||||
font-weight: ${({ weight }: WrapperProps) => fontWeight[weight]};
|
||||
text-transform: ${({ capitalize }: WrapperProps) => (capitalize ? 'capitalize' : 'none')};
|
||||
${({ modifiers }: WrapperProps) => modifiers};
|
||||
`;
|
||||
|
||||
const Label: React.FC<Props> = ({ text = '', capitalize = false, weight = 'regular', ...props }) => {
|
||||
return (
|
||||
// @ts-ignore
|
||||
<Wrapper capitalize={capitalize} weight={weight} {...props}>
|
||||
{text}
|
||||
</Wrapper>
|
||||
|
@ -11,15 +11,18 @@ export const Content = styled('div')({
|
||||
},
|
||||
});
|
||||
|
||||
interface ContainerProps {
|
||||
isLoading: boolean;
|
||||
}
|
||||
|
||||
export const Container = styled('div')`
|
||||
&& {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
overflow: hidden;
|
||||
${props =>
|
||||
// @ts-ignore
|
||||
props.isLoading &&
|
||||
${({ isLoading }: ContainerProps) =>
|
||||
isLoading &&
|
||||
css`
|
||||
${Content} {
|
||||
background-color: #f5f6f8;
|
||||
|
@ -8,7 +8,6 @@ interface Props {
|
||||
}
|
||||
|
||||
const Spinner: React.FC<Props> = ({ size = 50, centered = false }) => (
|
||||
// @ts-ignore
|
||||
<Wrapper centered={centered}>
|
||||
<Circular size={size} />
|
||||
</Wrapper>
|
||||
|
Loading…
Reference in New Issue
Block a user