mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 01:15:03 +03:00
add isOptional prop to CLI commands (#10995)
* add isOptional prop to CLI commands * fix: add required field to flag type * chore: fix indentation Co-authored-by: Han Qiao <sweatybridge@gmail.com>
This commit is contained in:
1 parent
a2b2e815c1
commit
16c9ab575f
1 file changed
+2
-1
@@ -27,6 +27,7 @@ export type Flag = {
|
||||
description: string
|
||||
default_value: string
|
||||
accepted_values: AcceptedValue[]
|
||||
required?: boolean
|
||||
}
|
||||
|
||||
export type AcceptedValue = {
|
||||
@@ -107,7 +108,7 @@ const CliCommandSection = (props) => {
|
||||
{command.flags.map((flag: Flag) => (
|
||||
<>
|
||||
<li className="mt-0">
|
||||
<Param {...flag}>
|
||||
<Param {...flag} isOptional={!flag.required}>
|
||||
{flag?.accepted_values && (
|
||||
<Options>
|
||||
{flag?.accepted_values.map((value) => {
|
||||
|
||||
Reference in new issue
Block a user