-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1376998
commit 4185d75
Showing
11 changed files
with
89 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ src/debug-connection.ts | |
*.md | ||
*.prisma | ||
failed-*.md | ||
test-introspection.ts | ||
test-introspection.ts | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
cli/introspection/src/prompt/screens/Step1StarterLanguageSelection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React, { useEffect } from 'react' | ||
import { Color, Box } from 'ink' | ||
import BorderBox from '../components/BorderBox' | ||
import chalk from 'chalk' | ||
import { Link } from '../components/Link' | ||
import { useExampleApi } from '../utils/useExampleApi' | ||
import { useInitState } from '../components/InitState' | ||
|
||
type Props = { | ||
outputDir: string | ||
} | ||
|
||
const Step1StarterLanguageSelection: React.FC<Props> = ({ outputDir }) => { | ||
// already cache the result for later screens | ||
const { setState } = useInitState()[1] | ||
useEffect(() => { | ||
// setState({ outputDir }) | ||
}) | ||
|
||
useExampleApi() | ||
return ( | ||
<Box flexDirection="column"> | ||
<Box flexDirection="column" marginLeft={2} marginBottom={1}> | ||
<Color bold>Select the language for your starter kit.</Color> | ||
</Box> | ||
<BorderBox flexDirection="column" title={chalk.bold('Starter kits are avaiable in the languages')} marginTop={1}> | ||
<Link label="Javascript" state={{ selectedLanguage: 'js' }} href="starter-selection" tabIndex={0} /> | ||
<Link label="TypeScript" state={{ selectedLanguage: 'ts' }} href="starter-selection" tabIndex={1} /> | ||
<Box marginLeft={2}> | ||
<Color dim>Go (Coming soon)</Color> | ||
</Box> | ||
</BorderBox> | ||
<Link label="Back" description="(Project options)" tabIndex={2} kind="back" /> | ||
</Box> | ||
) | ||
} | ||
|
||
export default Step1StarterLanguageSelection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
cli/introspection/src/prompt/screens/Step3LanguageSelection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react' | ||
import { Color, Box } from 'ink' | ||
import BorderBox from '../components/BorderBox' | ||
import chalk from 'chalk' | ||
import { Link } from '../components/Link' | ||
import { useInitState } from '../components/InitState' | ||
|
||
const Step3LanguageSelection: React.FC = () => { | ||
return ( | ||
<Box flexDirection="column"> | ||
<Box flexDirection="column" marginLeft={2}> | ||
<Color bold>Select the programming language you want to use.</Color> | ||
<Color dim>Specifies the language for Photon (database client).</Color> | ||
</Box> | ||
<BorderBox | ||
flexDirection="column" | ||
title={chalk.bold('Photon is available in these languages')} | ||
marginTop={1} | ||
marginBottom={1} | ||
> | ||
<Link label="JavaScript" href="demo-script-selection" tabIndex={0} state={{ selectedLanguage: 'js' }} /> | ||
<Link label="TypeScript" href="demo-script-selection" tabIndex={1} state={{ selectedLanguage: 'ts' }} /> | ||
<Box marginLeft={2}> | ||
<Color dim>Go (Coming soon)</Color> | ||
</Box> | ||
</BorderBox> | ||
<Link label="Back" href="home" description="(Tool selection)" tabIndex={3} kind="back" /> | ||
</Box> | ||
) | ||
} | ||
|
||
export default Step3LanguageSelection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters