History

Right-align inline secret creation actions (#232)

Right-align the cancel and submit buttons in the inline secret creation forms so the actions sit on the trailing edge of the panel. Also replace the primary button label text from "Create & use" to "Create and use" in both the shared secret-header auth UI and the Google Discovery inline secret form for consistency.

Christian Glassiognon committed 7 months ago

Commit 48eeb901 parent 5eae9a92 files · +4 −4Browse files

Unified · Split

2 files
  1. packages/plugins/google-discovery/src/react/AddGoogleDiscoverySource.tsx +2 −2
  2. packages/react/src/plugins/secret-header-auth.tsx +2 −2
packages/plugins/google-discovery/src/react/AddGoogleDiscoverySource.tsx+2−2
@@ -119,7 +119,7 @@ function InlineCreateSecret(props: { · 118 unmodified lines
119119 />
120120 </div>
121121 {error && <p className="text-[11px] text-destructive">{error}</p>}
122− <div className="flex gap-1.5 pt-0.5">
122+ <div className="flex justify-end gap-1.5 pt-0.5">
123123 <Button variant="outline" size="xs" onClick={props.onCancel}>
124124 Cancel
125125 </Button>
@@ -128,7 +128,7 @@ function InlineCreateSecret(props: { · 2 unmodified lines
128128 onClick={handleSave}
129129 disabled={!secretId.trim() || !secretValue.trim() || saving}
130130 >
131− {saving ? "Saving…" : "Create & use"}
131+ {saving ? "Saving…" : "Create and use"}
132132 </Button>
133133 </div>
134134 </div>
packages/react/src/plugins/secret-header-auth.tsx+2−2
@@ -150,7 +150,7 @@ function InlineCreateSecret(props: { · 149 unmodified lines
150150 {error && <FieldError>{error}</FieldError>}
151151 </Field>
152152 </FieldGroup>
153− <div className="flex gap-1.5 pt-0.5">
153+ <div className="flex justify-end gap-1.5 pt-0.5">
154154 <Button variant="outline" size="xs" onClick={props.onCancel}>
155155 Cancel
156156 </Button>
@@ -159,7 +159,7 @@ function InlineCreateSecret(props: { · 2 unmodified lines
159159 onClick={handleSave}
160160 disabled={!secretId.trim() || !secretValue.trim() || saving}
161161 >
162− {saving ? "Saving…" : "Create & use"}
162+ {saving ? "Saving…" : "Create and use"}
163163 </Button>
164164 </div>
165165 </div>