-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(codes-vertical): Adds codes component (#19)
Co-authored-by: dimitri.anoudis <[email protected]>
- Loading branch information
1 parent
1d0fdd2
commit fa1a5a7
Showing
4 changed files
with
148 additions
and
3 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
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,31 @@ | ||
{ | ||
"usageHeading": "Import a SurrealQL script into an existing database", | ||
"usage": "surreal import [OPTIONS] <file>", | ||
"args": "<file> Path to the sql file to import", | ||
"options": [ | ||
{ | ||
"option": "-c, --conn <conn>", | ||
"description": "Remote database server URL to connect to [default: https://cloud.surrealdb.com]" | ||
}, | ||
{ | ||
"option": "--db <db>", | ||
"description": "The database to import the data into" | ||
}, | ||
{ | ||
"option": "-h, --help", | ||
"description": "Print help information" | ||
}, | ||
{ | ||
"option": "--ns <ns>", | ||
"description": "The namespace to import the data into" | ||
}, | ||
{ | ||
"option": "-p, --pass <pass>", | ||
"description": "Database authentication password to use when connecting [default: root]" | ||
}, | ||
{ | ||
"option": "-u, --user <user>", | ||
"description": "Database authentication username to use when connecting [default: root]" | ||
} | ||
] | ||
} |
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,56 @@ | ||
import React from 'react'; | ||
import commandData from './commandData.json'; | ||
|
||
function CommandHelp() { | ||
const { | ||
commandLine, | ||
usageHeading, | ||
usage, | ||
args, | ||
options, | ||
} = commandData; | ||
|
||
return ( | ||
<codes vertical=''> | ||
<div className='codes'> | ||
<div> | ||
<pre> | ||
<code> | ||
{usageHeading} | ||
</code> | ||
</pre> | ||
<pre> | ||
<h5>USAGE:</h5> | ||
<code className='language-txt'> | ||
{usage} | ||
</code> | ||
</pre> | ||
<pre> | ||
<h5>ARGS:</h5> | ||
<code className='language-txt'> | ||
{args} | ||
</code> | ||
</pre> | ||
</div> | ||
<div className='options'> | ||
<h4>OPTIONS:</h4> | ||
<div className='option-description-container'> | ||
{options.map((option, index) => ( | ||
<div key={index} className='option-description'> | ||
<div className='option-column'> | ||
<span className='option-align'>{option.option}</span> | ||
</div> | ||
<div className='option-column'> | ||
<span className='option-desc-align'>{option.description}</span> | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</codes> | ||
); | ||
} | ||
|
||
export default CommandHelp; |
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