h2oai / wave

Realtime Web Apps and Dashboards for Python and R
https://wave.h2o.ai
Apache License 2.0
3.9k stars 323 forks source link

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

Closed marek-mihok closed 3 months ago

marek-mihok commented 3 months ago

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

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 commented 3 months ago

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

marek-mihok commented 3 months ago

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