Skip to content

Commit

Permalink
docs: Fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Jan 8, 2025
1 parent 89e0917 commit d3f6090
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 22 deletions.
4 changes: 2 additions & 2 deletions crates/components/src/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{
TooltipContainer,
};

/// Tooltip configuration for the [`Link`] component.
/// Tooltip configuration for the [`Link()`] component.
#[derive(Clone, PartialEq)]
pub enum LinkTooltip {
/// No tooltip at all.
Expand All @@ -34,7 +34,7 @@ pub enum LinkTooltip {
Custom(String),
}

/// Similar to [`Link`](dioxus_router::components::Link), but you can use it in Freya.
/// Similar to [`Link`](dioxus_router::components::Link()), but you can use it in Freya.
/// Both internal routes (dioxus-router) and external links are supported. When using internal routes
/// make sure the Link is descendant of a [`Router`](dioxus_router::components::Router) component.
///
Expand Down
10 changes: 5 additions & 5 deletions crates/components/src/resizable_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct ResizableContext {
pub direction: String,
}

/// Resizable container, used in combination with [ResizablePanel] and [ResizableHandle].
/// Resizable container, used in combination with [ResizablePanel()] and [ResizableHandle()].
///
/// Example:
///
Expand Down Expand Up @@ -81,7 +81,7 @@ pub fn ResizableContainer(
/// Default to `vertical`.
#[props(default = "vertical".to_string())]
direction: String,
/// Inner children for the [ResizableContainer].
/// Inner children for the [ResizableContainer()].
children: Element,
) -> Element {
let (node_reference, size) = use_node_signal();
Expand All @@ -106,7 +106,7 @@ pub fn ResizableContainer(
)
}

/// Resizable panel to be used in combination with [ResizableContainer] and [ResizableHandle].
/// Resizable panel to be used in combination with [ResizableContainer()] and [ResizableHandle()].
#[component]
pub fn ResizablePanel(
/// Initial size in % for this panel. Default to `10`.
Expand All @@ -115,7 +115,7 @@ pub fn ResizablePanel(
/// Minimum size in % for this panel. Default to `4`.
#[props(default = 4.)]
min_size: f32,
/// Inner children for the [ResizablePanel].
/// Inner children for the [ResizablePanel()].
children: Element,
) -> Element {
let mut registry = use_context::<Signal<ResizableContext>>();
Expand Down Expand Up @@ -157,7 +157,7 @@ pub enum HandleStatus {
Hovering,
}

/// Resizable panel to be used in combination with [ResizableContainer] and [ResizablePanel].
/// Resizable panel to be used in combination with [ResizableContainer()] and [ResizablePanel()].
#[component]
pub fn ResizableHandle(
/// Theme override.
Expand Down
6 changes: 2 additions & 4 deletions crates/components/src/tile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,17 @@ pub enum TileStatus {
Hovering,
}

/// Tile component to be used with [`Radio`] and [`Checkbox`].
/// Tile component to be used with [`Radio`](crate::Radio()) and [`Checkbox`](crate::Checkbox()).
/// # Styling
/// Inherits the [`TileTheme`](freya_hooks::TileTheme) theme.
///
/// # Example
///
/// Tile is meant to be used with other components, take a look at [`Radio`](crate::Radio) for instance.
#[allow(non_snake_case)]
#[component]
pub fn Tile(
/// Inner children for the Tile.
children: Element,
/// Optional element to be placed before the inner children of the Tile. Such as a [`Radio`](crate::Radio)
/// Optional element to be placed before the inner children of the Tile. Such as a [`Radio`](crate::Radio())
leading: Option<Element>,
/// Event handler for when the Tile is selected, e.g when clicking on it.
onselect: Option<EventHandler<()>>,
Expand Down
5 changes: 1 addition & 4 deletions crates/elements/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ repository = "https://github.com/marc2332/freya"
keywords = ["gui", "ui", "desktop", "skia", "dioxus"]
categories = ["gui", "asynchronous"]

[features]
docs = []

[dependencies]
torin = { workspace = true }

generational-box ={ workspace = true }
generational-box = { workspace = true }
dioxus-rsx = { workspace = true }
dioxus-core = { workspace = true }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The `onglobalfilehovercancelled` event fires when the user cancels the hovering of a file over the window. It's the opposite of [`onglobalfilehover`](crate::elements::onglobalfilehover).
The `onglobalfilehovercancelled` event fires when the user cancels the hovering of a file over the window. It's the opposite of [`onglobalfilehover`](crate::elements::onglobalfilehover()).

Event Data: [`FileData`](crate::events::FileData)

Expand Down
2 changes: 1 addition & 1 deletion crates/elements/src/_docs/events/mousemove.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The `mousemove` event fires when the user moves the mouse over an element.
Unlike [`onmouseenter`](crate::elements::onmouseenter), this fires even if the user was already hovering over
Unlike [`onmouseenter`](crate::elements::onmouseenter()), this fires even if the user was already hovering over
the element. For that reason, it's less efficient.

Event Data: [`MouseData`](crate::events::MouseData)
Expand Down
2 changes: 1 addition & 1 deletion crates/elements/src/_docs/events/pointermove.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The `pointermove` event fires when the user moves the cursor or touches over an element.
Unlike [`onpointerenter`](crate::elements::onpointerenter), this fires even if the user was already hovering over
Unlike [`onpointerenter`](crate::elements::onpointerenter()), this fires even if the user was already hovering over
the element.

Event Data: [`PointerData`](crate::events::PointerData)
Expand Down
2 changes: 1 addition & 1 deletion crates/elements/src/_docs/events/touchcancel.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The `touchcancel` event fires when the user cancels the touching, this is usually caused by the hardware or the OS.
Also see [`ontouchend`](crate::elements::ontouchend).
Also see [`ontouchend`](crate::elements::ontouchend()).

Event Data: [`TouchData`](crate::events::TouchData)

Expand Down
1 change: 0 additions & 1 deletion crates/elements/src/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,6 @@ pub mod events {
).into()
}

#[cfg(not(feature = "docs"))]
#[doc(hidden)]
$( #[$attr] )*
pub mod $name {
Expand Down
2 changes: 1 addition & 1 deletion crates/freya/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ default = ["skia"]
performance-overlay = []
fade-cached-incremental-areas = ["freya-core/fade-cached-incremental-areas"]
disable-zoom-shortcuts = ["freya-renderer/disable-zoom-shortcuts"]
docs = ["dep:freya-testing", "dep:dioxus-i18n", "dep:dioxus-router", "freya-elements/docs"]
docs = ["dep:freya-testing", "dep:dioxus-i18n", "dep:dioxus-router"]

[dependencies]
freya-devtools = { workspace = true, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/hooks/src/use_animation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ impl<Animated: PartialEq + Clone + 'static> UseAnimator<Animated> {
/// }
/// ```
///
/// You can also tweak what to do once the animation has finished with [`Context::on_finish`].
/// You can also tweak what to do once the animation has finished with [`AnimationContext::on_finish`].
///
/// ```rust,no_run
/// # use freya::prelude::*;
Expand Down

0 comments on commit d3f6090

Please sign in to comment.