-
Notifications
You must be signed in to change notification settings - Fork 881
fix: extract checkbox label from dynamic parameter styling prop #17651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to fix whatever the type of parameter.styling
is here. even if it's just Record<string, string>
, that's better than one off type assertions littered all over the place.
@aslilac improved the handling of parameter styling |
@@ -470,6 +471,7 @@ export const CreateWorkspacePageViewExperimental: FC< | |||
|
|||
<div className="flex flex-col gap-9"> | |||
{parameters.map((parameter, index) => { | |||
const styling = parameter.styling as ParameterStyling; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah but this is still an inline cast. whatever the type of parameter
is here should have a styling: ParameterStyling;
member.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the styling type in coder/preview
0fca373
to
81e4f77
Compare
resolves #17474
A label will only be shown next to the checkbox If there is a value for
label
in the styling prop for the dynamic parameter