Skip to content
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

feat: Add width support for copyable text #2282 #2284

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Conversation

marek-mihok
Copy link
Contributor

The PR fulfills these requirements: (check all the apply)

  • It's submitted to the main branch.
  • When resolving a specific issue, it's referenced in the PR's title (e.g. feat: Add a button #xxx, where "xxx" is the issue number).
  • When resolving a specific issue, the PR description includes Closes #xxx, where "xxx" is the issue number.
  • If changes were made to ui folder, unit tests (make test) still pass.
  • New/updated tests are included

This PR adds support for width property for ui.copyable_text and makes it consistent with the rest of the form components. Updated API is as follows:

export interface CopyableText {
  /** Text to be displayed inside the component. */
  value: S
  /** The text displayed above the textbox. */
  label: S
  /** An identifying name for this component. */
  name?: S
  /** True if the component should allow multi-line text entry. */
  multiline?: B
  /** Custom height in px (e.g. '200px') or '1' to fill the remaining card space. Requires `multiline` to be set. */
  height?: S
  /** The width of the copyable text , e.g. '100px'. */
  width?: S
}
image

Closes #2282

@mturoci
Copy link
Collaborator

mturoci commented Mar 6, 2024

Seems like you forgot to push the actual implementation or am I missing something?

@marek-mihok
Copy link
Contributor Author

@mturoci, the width of components is handled on the form level so the implementation lies only in adding the width prop for the component.

Copy link
Collaborator

@mturoci mturoci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thanks for reminder!

@mturoci mturoci merged commit e10e866 into main Mar 7, 2024
2 checks passed
@mturoci mturoci deleted the feat/issue-2282 branch March 7, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add width arg to ui.copyable_text
2 participants