Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Better layout for checkbox? #3234

Open
fengye87 opened this issue Apr 1, 2022 · 0 comments
Open

Better layout for checkbox? #3234

fengye87 opened this issue Apr 1, 2022 · 0 comments

Comments

@fengye87
Copy link

fengye87 commented Apr 1, 2022

What steps did you take and what happened:

  1. Create a form (better inside a stepper) with a checkbox as the last field
  2. The checkbox is not properly padded and both field label and choice label was displayed

Screen Shot 2022-04-01 at 2 51 14 PM

newPodModal := component.NewModal(component.TitleFromString("New Pod"))
newPodStepper := component.NewStepper("New Pod", "example.org/pods/create")
podNameForm := component.Form{
	Fields: []component.FormField{
		component.NewFormFieldText("Name", "name", ""),
	},
}
newPodStepper.AddStep("Name", podNameForm, "Step 1", "Choose pod name")
podImageForm := component.Form{
	Fields: []component.FormField{
		component.NewFormFieldText("Image", "image", ""),
		component.NewFormFieldCheckBox("Privileged", "privileged", []component.InputChoice{{
			Label:   "Privileged",
			Checked: false,
		}}),
	},
}
newPodStepper.AddStep("Image", podImageForm, "Step 2", "Choose pod image")
newPodModal.SetBody(newPodStepper)
newPodModal.SetSize(component.ModalSizeExtraLarge)

What did you expect to happen:

  1. The checkbox should be properly padded
  2. Either field label or choice label should be displayed

Environment:

  • Octant version (use octant version): 0.25.1
  • Kubernetes version (use kubectl version): 1.23.5
  • OS (macOS 10.15, Windows 10, Ubuntu 19.10 etc): Fedora 35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant