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
119 />119 />
120 </div>120 </div>
121 {error && <p className="text-[11px] text-destructive">{error}</p>}121 {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">
123 <Button variant="outline" size="xs" onClick={props.onCancel}>123 <Button variant="outline" size="xs" onClick={props.onCancel}>
124 Cancel124 Cancel
125 </Button>125 </Button>
@@ -128,7 +128,7 @@ function InlineCreateSecret(props: { · 2 unmodified lines
128 onClick={handleSave}128 onClick={handleSave}
129 disabled={!secretId.trim() || !secretValue.trim() || saving}129 disabled={!secretId.trim() || !secretValue.trim() || saving}
130 >130 >
131 {saving ? "Saving…" : "Create & use"}131 {saving ? "Saving…" : "Create and use"}
132 </Button>132 </Button>
133 </div>133 </div>
134 </div>134 </div>
packages/react/src/plugins/secret-header-auth.tsx+2−2
@@ -150,7 +150,7 @@ function InlineCreateSecret(props: { · 149 unmodified lines
150 {error && <FieldError>{error}</FieldError>}150 {error && <FieldError>{error}</FieldError>}
151 </Field>151 </Field>
152 </FieldGroup>152 </FieldGroup>
153 <div className="flex gap-1.5 pt-0.5">153 <div className="flex justify-end gap-1.5 pt-0.5">
154 <Button variant="outline" size="xs" onClick={props.onCancel}>154 <Button variant="outline" size="xs" onClick={props.onCancel}>
155 Cancel155 Cancel
156 </Button>156 </Button>
@@ -159,7 +159,7 @@ function InlineCreateSecret(props: { · 2 unmodified lines
159 onClick={handleSave}159 onClick={handleSave}
160 disabled={!secretId.trim() || !secretValue.trim() || saving}160 disabled={!secretId.trim() || !secretValue.trim() || saving}
161 >161 >
162 {saving ? "Saving…" : "Create & use"}162 {saving ? "Saving…" : "Create and use"}
163 </Button>163 </Button>
164 </div>164 </div>
165 </div>165 </div>