Skip to content

Commit

Permalink
♻️ upgraded
Browse files Browse the repository at this point in the history
  • Loading branch information
Taimoormk committed Dec 5, 2023
1 parent 5d0e175 commit 12d210e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 15 deletions.
1 change: 1 addition & 0 deletions scripts/.svgrrc-color.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
icon: true,
svgoConfig: {
typescript: true,
plugins: [
{
name: 'removeViewBox',
Expand Down
4 changes: 2 additions & 2 deletions scripts/svgr-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ${variables.componentName} = (${variables.props}) => (
);
${variables.exports};
`
}
`;
};

module.exports = template;
10 changes: 2 additions & 8 deletions src/styled-app.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { ITheme } from '@react-pakistan/util-functions';
import * as React from 'react';
import styled, { ThemeProvider, ThemedStyledProps } from 'styled-components';
import styled, { ThemeProvider } from 'styled-components';
import { MiscColor1 } from './misc-color';
import { logoTheme } from './theme';

export const StyledApp = styled.div`
display: inline-block;
font-family: ${({ theme } : ThemedStyledProps<{}, ITheme>) : string => theme.typography.fontFamily};
font-family: ${({ theme }) : string => theme.typography.fontFamily};
width: 100%;
*,
*::before,
Expand All @@ -21,8 +20,3 @@ export const StyledStory = ({ children } : { children : React.ReactNode }) => (
<MiscColor1 fontSize='200px' />
</ThemeProvider>
);

// Due to our `typedef` rule, this type is needed as a helper.
// Actually, by using helpers exported above, styled-components-props
// can be calculated automatically by tsc already.
export type WithTheme<P = {}> = ThemedStyledProps<P, ITheme>;
5 changes: 2 additions & 3 deletions src/styled.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { ITheme } from '@react-pakistan/util-functions';
import { SVGProps } from 'react';
import styled, { ThemedStyledProps } from 'styled-components';
import styled from 'styled-components';

export const LogoWrapper = styled.div`
display: flex;
flex-wrap: wrap;
`;

export const LogoTextWrapper = styled.div`
color: ${({ theme } : ThemedStyledProps<{}, ITheme>) : string => theme.colors.white};
color: ${({ theme }) : string => theme.colors.white};
font-size: 0.75em;
margin-top: 0.75em;
`;
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"outDir": "./lib",
"target": "es5",
"module": "commonjs",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": true,
"noUnusedLocals": true,
"skipLibCheck": true,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"noImplicitAny": false,
"noImplicitAny": true,
"strictNullChecks": false,
"skipLibCheck": true,
"noUnusedLocals": true,
Expand Down

0 comments on commit 12d210e

Please sign in to comment.