Skip to content

Commit

Permalink
feat: remove 'stretch' for ui.inline h2oai#1535
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolapps committed Dec 9, 2022
1 parent bd14288 commit 520fd37
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions py/h2o_wave/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -5925,15 +5925,14 @@ class InlineJustify:
AROUND = 'around'


_InlineAlign = ['start', 'end', 'center', 'baseline', 'stretch']
_InlineAlign = ['start', 'end', 'center', 'baseline']


class InlineAlign:
START = 'start'
END = 'end'
CENTER = 'center'
BASELINE = 'baseline'
STRETCH = 'stretch'


class Inline:
Expand All @@ -5955,7 +5954,7 @@ def __init__(
self.justify = justify
"""Specifies how to lay out the individual components. Defaults to 'start'. One of 'start', 'end', 'center', 'between', 'around'. See enum h2o_wave.ui.InlineJustify."""
self.align = align
"""Specifies how the individual components are aligned on the vertical axis. Defaults to 'center'. One of 'start', 'end', 'center', 'baseline', 'stretch'. See enum h2o_wave.ui.InlineAlign."""
"""Specifies how the individual components are aligned on the vertical axis. Defaults to 'center'. One of 'start', 'end', 'center', 'baseline'. See enum h2o_wave.ui.InlineAlign."""
self.inset = inset
"""Whether to display the components inset from the parent form, with a contrasting background."""

Expand Down
2 changes: 1 addition & 1 deletion py/h2o_wave/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2205,7 +2205,7 @@ def inline(
Args:
items: The components laid out inline.
justify: Specifies how to lay out the individual components. Defaults to 'start'. One of 'start', 'end', 'center', 'between', 'around'. See enum h2o_wave.ui.InlineJustify.
align: Specifies how the individual components are aligned on the vertical axis. Defaults to 'center'. One of 'start', 'end', 'center', 'baseline', 'stretch'. See enum h2o_wave.ui.InlineAlign.
align: Specifies how the individual components are aligned on the vertical axis. Defaults to 'center'. One of 'start', 'end', 'center', 'baseline'. See enum h2o_wave.ui.InlineAlign.
inset: Whether to display the components inset from the parent form, with a contrasting background.
Returns:
A `h2o_wave.types.Inline` instance.
Expand Down
2 changes: 1 addition & 1 deletion r/R/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -2578,7 +2578,7 @@ ui_stats <- function(
#' @param justify Specifies how to lay out the individual components. Defaults to 'start'.
#' One of 'start', 'end', 'center', 'between', 'around'. See enum h2o_wave.ui.InlineJustify.
#' @param align Specifies how the individual components are aligned on the vertical axis. Defaults to 'center'.
#' One of 'start', 'end', 'center', 'baseline', 'stretch'. See enum h2o_wave.ui.InlineAlign.
#' One of 'start', 'end', 'center', 'baseline'. See enum h2o_wave.ui.InlineAlign.
#' @param inset Whether to display the components inset from the parent form, with a contrasting background.
#' @return A Inline instance.
#' @export
Expand Down
4 changes: 2 additions & 2 deletions ui/src/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ interface Inline {
/** Specifies how to lay out the individual components. Defaults to 'start'. */
justify?: 'start' | 'end' | 'center' | 'between' | 'around'
/** Specifies how the individual components are aligned on the vertical axis. Defaults to 'center'. */
align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch'
align?: 'start' | 'end' | 'center' | 'baseline'
/** Whether to display the components inset from the parent form, with a contrasting background. */
inset?: B
}
Expand Down Expand Up @@ -217,7 +217,7 @@ const
})

type Justification = 'start' | 'end' | 'center' | 'between' | 'around'
type Alignment = 'start' | 'end' | 'center' | 'baseline' | 'stretch'
type Alignment = 'start' | 'end' | 'center' | 'baseline'

export const
XComponents = ({ items, justify, align, inset }: { items: Component[], justify?: Justification, align?: Alignment, inset?: B }) => {
Expand Down

0 comments on commit 520fd37

Please sign in to comment.