Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 0433ead

Browse files
authored
chore(ts-js): more ts day4 (#1019)
* refactor(ts-workflow): re-org spec by module * refactor(ts-workflow): IRootStore -> TRootStore * refactor(ts-workflow): drawer store js -> ts, fix * refactor(ts-workflow): add type syntax when import @SPEC * refactor(ts-workflow): add type syntax when import @SPEC * chore(ts-workflow): more store.js -> ts
1 parent 4b26ca9 commit 0433ead

File tree

221 files changed

+502
-395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+502
-395
lines changed

src/components/AlertBar/styles/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled from 'styled-components'
22

3-
import { TTestable } from '@/spec'
3+
import type { TTestable } from '@/spec'
44
// import Img from '@/Img'
55
// import { theme } from '@/utils'
66

src/components/ArticleEditToolbar/styles/copyright_selector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled from 'styled-components'
22

3-
import { TActive } from '@/spec'
3+
import type { TActive } from '@/spec'
44
import { theme, css } from '@/utils'
55
import Img from '@/Img'
66

src/components/Buttons/OrButton/HorizontalButton.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22

3+
import type { TSIZE } from '@/spec'
34
import { SIZE } from '@/constant'
4-
import { TButtonSize } from '@/spec'
55

66
import {
77
Wrapper,
@@ -12,7 +12,7 @@ import {
1212

1313
type TProps = {
1414
activeKey: string
15-
size?: TButtonSize
15+
size?: TSIZE
1616
onClick: (key: string) => void
1717
group: {
1818
key: string
@@ -22,7 +22,7 @@ type TProps = {
2222

2323
const HorizontalButton: React.FC<TProps> = ({
2424
onClick,
25-
size = SIZE.SMALL as TButtonSize,
25+
size = SIZE.SMALL as TSIZE,
2626
activeKey,
2727
group,
2828
}) => {

src/components/Buttons/styles/button.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import styled from 'styled-components'
22
import { lighten } from 'polished'
33

44
import { css, theme } from '@/utils'
5-
import { TButtonSize, TButton } from '@/spec'
5+
import type { TSIZE, TButton } from '@/spec'
66

77
import {
88
getColor,
@@ -67,7 +67,7 @@ export const Wrapper = styled.button<TButton>`
6767
opacity: 1;
6868
}
6969
`
70-
export const ChildrenWrapper = styled.div<{ size: TButtonSize }>`
70+
export const ChildrenWrapper = styled.div<{ size: TSIZE }>`
7171
${css.flex('align-both')};
7272
font-size: ${({ size }) => getFontSize(size)};
7373
position: relative;

src/components/Buttons/styles/metircs/button.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { SIZE } from '@/constant'
22
import { theme } from '@/utils'
33

4-
import { TTheme } from '@/spec'
4+
import type { TTheme } from '@/spec'
55

66
export const getColor = (ghost: boolean, disabled: boolean): TTheme => {
77
if (ghost) {

src/components/Buttons/styles/notify_button/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled from 'styled-components'
22

3-
import { TTestable } from '@/spec'
3+
import type { TTestable } from '@/spec'
44
import Img from '@/Img'
55
import { css, theme } from '@/utils'
66

src/components/Buttons/styles/or_button/horizontal_button.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import styled from 'styled-components'
22
// import { lighten } from 'polished'
33

4-
import { TButton, TButtonSize } from '@/spec'
4+
import type { TButton, TSIZE } from '@/spec'
55
import { theme, css } from '@/utils'
66

77
import { Wrapper as BaseBtnWrapper } from '../button'
88
import { OrSignBase } from './index'
99

10-
export const Wrapper = styled.div<{ size: TButtonSize }>`
10+
export const Wrapper = styled.div<{ size: TSIZE }>`
1111
${css.flex('align-center')};
1212
position: relative;
1313
`

src/components/Buttons/styles/or_button/vertical_button.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import styled from 'styled-components'
22
// import { lighten } from 'polished'
33

4-
import { TActive } from '@/spec'
4+
import type { TActive } from '@/spec'
55
import { css, theme } from '@/utils'
66

77
import { Wrapper as BaseBtnWrapper } from '../button'

src/components/BuyMeChuanChuan/styles/chuan_selector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled from 'styled-components'
22

3-
import { TActive } from '@/spec'
3+
import type { TActive } from '@/spec'
44
import { animate, theme, css } from '@/utils'
55
import Img from '@/Img'
66

src/components/Charger/styles/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled, { css as styledCss, keyframes } from 'styled-components'
22

3-
import { TTestable } from '@/spec'
3+
import type { TTestable } from '@/spec'
44
import Img from '@/Img'
55
import { theme, css } from '@/utils'
66

0 commit comments

Comments
 (0)