Fix UI doc test

This commit is contained in:
Max Brunsfeld 2024-01-03 13:21:45 -08:00
parent a8061232a5
commit 1184de64d5
2 changed files with 5 additions and 5 deletions

View file

@ -78,7 +78,7 @@ pub trait StyledExt: Styled + Sized {
self.text_size(settings.buffer_font_size(cx)) self.text_size(settings.buffer_font_size(cx))
} }
/// The [`Surface`](ui2::ElevationIndex::Surface) elevation level, located above the app background, is the standard level for all elements /// The [`Surface`](ui::ElevationIndex::Surface) elevation level, located above the app background, is the standard level for all elements
/// ///
/// Sets `bg()`, `rounded_lg()`, `border()`, `border_color()`, `shadow()` /// Sets `bg()`, `rounded_lg()`, `border()`, `border_color()`, `shadow()`
/// ///
@ -87,7 +87,7 @@ pub trait StyledExt: Styled + Sized {
elevated(self, cx, ElevationIndex::Surface) elevated(self, cx, ElevationIndex::Surface)
} }
/// Non-Modal Elevated Surfaces appear above the [`Surface`](ui2::ElevationIndex::Surface) layer and is used for things that should appear above most UI elements like an editor or panel, but not elements like popovers, context menus, modals, etc. /// Non-Modal Elevated Surfaces appear above the [`Surface`](ui::ElevationIndex::Surface) layer and is used for things that should appear above most UI elements like an editor or panel, but not elements like popovers, context menus, modals, etc.
/// ///
/// Sets `bg()`, `rounded_lg()`, `border()`, `border_color()`, `shadow()` /// Sets `bg()`, `rounded_lg()`, `border()`, `border_color()`, `shadow()`
/// ///
@ -100,7 +100,7 @@ pub trait StyledExt: Styled + Sized {
/// ///
/// Elements rendered at this layer should have an enforced behavior: Any interaction outside of the modal will either dismiss the modal or prompt an action (Save your progress, etc) then dismiss the modal. /// Elements rendered at this layer should have an enforced behavior: Any interaction outside of the modal will either dismiss the modal or prompt an action (Save your progress, etc) then dismiss the modal.
/// ///
/// If the element does not have this behavior, it should be rendered at the [`Elevated Surface`](ui2::ElevationIndex::ElevatedSurface) layer. /// If the element does not have this behavior, it should be rendered at the [`Elevated Surface`](ui::ElevationIndex::ElevatedSurface) layer.
/// ///
/// Sets `bg()`, `rounded_lg()`, `border()`, `border_color()`, `shadow()` /// Sets `bg()`, `rounded_lg()`, `border()`, `border_color()`, `shadow()`
/// ///

View file

@ -246,7 +246,7 @@ fn distance_string(
/// ///
/// ```rust /// ```rust
/// use chrono::DateTime; /// use chrono::DateTime;
/// use ui2::utils::naive_format_distance; /// use ui::utils::format_distance;
/// ///
/// fn time_between_moon_landings() -> String { /// fn time_between_moon_landings() -> String {
/// let date = DateTime::parse_from_rfc3339("1969-07-20T00:00:00Z").unwrap().naive_local(); /// let date = DateTime::parse_from_rfc3339("1969-07-20T00:00:00Z").unwrap().naive_local();
@ -282,7 +282,7 @@ pub fn format_distance(
/// ///
/// ```rust /// ```rust
/// use chrono::DateTime; /// use chrono::DateTime;
/// use ui2::utils::naive_format_distance_from_now; /// use ui::utils::naive_format_distance_from_now;
/// ///
/// fn time_since_first_moon_landing() -> String { /// fn time_since_first_moon_landing() -> String {
/// let date = DateTime::parse_from_rfc3339("1969-07-20T00:00:00Z").unwrap().naive_local(); /// let date = DateTime::parse_from_rfc3339("1969-07-20T00:00:00Z").unwrap().naive_local();