Skip to content

feat: min and max props added to Grid#417

Merged
lizidev merged 2 commits intothaw-ui:mainfrom
jerhat:grid-minmax
Jun 24, 2025
Merged

feat: min and max props added to Grid#417
lizidev merged 2 commits intothaw-ui:mainfrom
jerhat:grid-minmax

Conversation

@jerhat
Copy link
Copy Markdown
Contributor

@jerhat jerhat commented Jun 9, 2025

No description provided.

/// The min width of columns.
/// Defaults to "0px".
#[prop(into, default = "0px".into())]
min: MaybeProp<String>,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there any point in using MaybeProp instead of Signal here? Using the Signal type, we can ensure that min always has a value. (e.g. "0px")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree with you, a Signal (with a default value) is better than a MaybeProp in this case. I have made the changes, see 16bf621.

/// The max width of columns.
/// Defaults to "1fr".
#[prop(into, default = "1fr".into())]
max: MaybeProp<String>,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there any point in using MaybeProp instead of Signal here? Using the Signal type, we can ensure that max always has a value. (e.g. "1fr")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree with you, a Signal (with a default value) is better than a MaybeProp in this case. I have made the changes, see 16bf621.

@lizidev
Copy link
Copy Markdown
Collaborator

lizidev commented Jun 24, 2025

Thanks!

The CI error was caused by cargo-leptos packaging. I tried it locally and there was no problem.

@lizidev lizidev merged commit cddac8a into thaw-ui:main Jun 24, 2025
4 of 5 checks passed
dzamlo pushed a commit to dzamlo/thaw that referenced this pull request Jul 26, 2025
* grid: added min and max props

* switch from `MaybeProp`s to `Signal`s
lizidev pushed a commit that referenced this pull request Aug 1, 2025
* feat: min and max props added to Grid (#417)

* grid: added min and max props

* switch from `MaybeProp`s to `Signal`s

* add input_size property to spin_button

* i32 -> u32

---------

Co-authored-by: jerhat <2805041+jerhat@users.noreply.github.com>
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.

2 participants