Skip to content

Commit

Permalink
Merge pull request #36 from mj-studio-library/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
mym0404 authored Mar 19, 2024
2 parents 144366b + 880b468 commit 25061bf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 171 deletions.
147 changes: 7 additions & 140 deletions bin/ret.d.ts
Original file line number Diff line number Diff line change
@@ -1,144 +1,11 @@


import type { ColorsValue, RadiiValue, SizesValue, SpaceValue } from './Token';

export interface ThemedTypings {
colors:
| ColorsValue
| 'white'
| 'black'
| 'transparent'
| 'gray50'
| 'gray100'
| 'gray200'
| 'gray300'
| 'gray400'
| 'gray500'
| 'gray600'
| 'gray700'
| 'gray800'
| 'gray900'
| 'violet50'
| 'violet100'
| 'violet200'
| 'violet300'
| 'violet400'
| 'violet500'
| 'violet600'
| 'violet700'
| 'violet800'
| 'violet900'
| 'green50'
| 'green100'
| 'green200'
| 'green300'
| 'green400'
| 'green500'
| 'green600'
| 'yellow50'
| 'yellow100'
| 'yellow200'
| 'yellow300'
| 'yellow400'
| 'yellow500'
| 'yellow600'
| 'red50'
| 'red100'
| 'red200'
| 'red300'
| 'red400'
| 'red500'
| 'red600'
| 'blue50'
| 'blue100'
| 'blue200'
| 'blue300'
| 'blue400'
| 'blue500'
| 'blue600'
| 'blue700'
| 'blue800'
| 'blue900';
radii: RadiiValue | `${number}` | `${number}px` | `${any}px` | '1' | '2' | 'sm' | 'md';
sizes:
| SizesValue
| `${number}`
| `${number}px`
| `${any}px`
| '0'
| '1'
| '2'
| '3'
| '4'
| '5'
| '6'
| '7'
| '8'
| '9'
| '10'
| '12'
| '14'
| '16'
| '18'
| '20'
| '24'
| '28'
| '30'
| '32'
| '40'
| '48'
| 'px'
| '0.5';
space:
| SpaceValue
| `${number}`
| `${number}px`
| `${any}px`
| '0'
| '-0'
| '1'
| '-1'
| '2'
| '-2'
| '3'
| '-3'
| '4'
| '-4'
| '5'
| '-5'
| '6'
| '-6'
| '7'
| '-7'
| '8'
| '-8'
| '9'
| '-9'
| '10'
| '-10'
| '12'
| '-12'
| '14'
| '-14'
| '16'
| '-16'
| '18'
| '-18'
| '20'
| '-20'
| '24'
| '-24'
| '28'
| '-28'
| '30'
| '-30'
| '32'
| '-32'
| '40'
| '-40'
| '48'
| '-48'
| 'px'
| '-px'
| '0.5'
| '-0.5';
typography: 'h1';
colors: ColorsValue | "white" | "black" | "transparent" | "gray50" | "gray100" | "gray200" | "gray300" | "gray400" | "gray500" | "gray600" | "gray700" | "gray800" | "gray900" | "violet50" | "violet100" | "violet200" | "violet300" | "violet400" | "violet500" | "violet600" | "violet700" | "violet800" | "violet900" | "green50" | "green100" | "green200" | "green300" | "green400" | "green500" | "green600" | "yellow50" | "yellow100" | "yellow200" | "yellow300" | "yellow400" | "yellow500" | "yellow600" | "red50" | "red100" | "red200" | "red300" | "red400" | "red500" | "red600" | "blue50" | "blue100" | "blue200" | "blue300" | "blue400" | "blue500" | "blue600" | "blue700" | "blue800" | "blue900"
radii: RadiiValue | `${number}` | `${number}px` | `${any}px` | "1" | "2" | "sm" | "md"
sizes: SizesValue | `${number}` | `${number}px` | `${any}px` | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "12" | "14" | "16" | "18" | "20" | "24" | "28" | "30" | "32" | "40" | "48" | "px" | "0.5"
space: SpaceValue | `${number}` | `${number}px` | `${any}px` | "0" | "-0" | "1" | "-1" | "2" | "-2" | "3" | "-3" | "4" | "-4" | "5" | "-5" | "6" | "-6" | "7" | "-7" | "8" | "-8" | "9" | "-9" | "10" | "-10" | "12" | "-12" | "14" | "-14" | "16" | "-16" | "18" | "-18" | "20" | "-20" | "24" | "-24" | "28" | "-28" | "30" | "-30" | "32" | "-32" | "40" | "-40" | "48" | "-48" | "px" | "-px" | "0.5" | "-0.5"
typography: "h1"
}
2 changes: 1 addition & 1 deletion bin/theme-gen.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const outputFile =
'./node_modules/react-native-themed-styled-system/lib/typescript/@types/ThemedTypings.d.ts';

try {
await $`yarn react-native-themed-styled-system-cli generate --out ${tmpFile} ${source}`;
await $`npx react-native-themed-styled-system-cli generate --out ${tmpFile} ${source}`;

/**
* export interface ThemedTypings {
Expand Down
16 changes: 1 addition & 15 deletions doc/docs/usage/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ title: TypeScript




import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Expand All @@ -14,21 +15,6 @@ import TabItem from '@theme/TabItem';

React Native Styled System aims for type-safe use.

Install the CLI for generation.

<Tabs>
<TabItem value="npm" label="npm" default>
```sh
npm install --save-dev react-native-themed-styled-system-cli
```
</TabItem>
<TabItem value="yarn" label="yarn">
```sh
yarn add -D react-native-themed-styled-system-cli
```
</TabItem>
</Tabs>

Please enter the path to the module where `ThemedDict` is `default exported` as an argument to the command.

```shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: TypeScript
---



import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Expand All @@ -12,21 +13,6 @@ import TabItem from '@theme/TabItem';

React Native Styled System은 Type Safe한 사용을 지향합니다.

CLI를 설치해주세요.

<Tabs>
<TabItem value="npm" label="npm" default>
```sh
npm install --save-dev react-native-themed-styled-system-cli
```
</TabItem>
<TabItem value="yarn" label="yarn">
```sh
yarn add -D react-native-themed-styled-system-cli
```
</TabItem>
</Tabs>

`ThemedDict``default export`된 모듈의 경로를 커맨드의 인자로 넣어주세요.

```shell
Expand Down

0 comments on commit 25061bf

Please sign in to comment.