Merge pull request #2668 from edwloef/master

Fix docs of `Scrollable::with_direction` and `Scrollable::direction`
This commit is contained in:
Héctor 2024-11-13 18:20:20 +01:00 committed by GitHub
commit 2a2e20b0a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -95,7 +95,7 @@ where
Self::with_direction(content, Direction::default()) Self::with_direction(content, Direction::default())
} }
/// Creates a new vertical [`Scrollable`]. /// Creates a new [`Scrollable`] with the given [`Direction`].
pub fn with_direction( pub fn with_direction(
content: impl Into<Element<'a, Message, Theme, Renderer>>, content: impl Into<Element<'a, Message, Theme, Renderer>>,
direction: impl Into<Direction>, direction: impl Into<Direction>,
@ -137,7 +137,7 @@ where
self self
} }
/// Creates a new [`Scrollable`] with the given [`Direction`]. /// Sets the [`Direction`] of the [`Scrollable`].
pub fn direction(mut self, direction: impl Into<Direction>) -> Self { pub fn direction(mut self, direction: impl Into<Direction>) -> Self {
self.direction = direction.into(); self.direction = direction.into();
self.validate() self.validate()