euv-ui 0.33.0

Reusable UI component library for the euv framework, providing buttons, cards, modals, inputs, and more.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

/// Obtains the [`UseClipboard`] registered against the current hook
/// context slot.
///
/// Behaves like `HookContext::use_hook` - the same handle is returned on
/// every render at the same hook index, so the status survives
/// re-renders.
///
/// # Returns
///
/// - `UseClipboard` - The handle, with `get_status()` returning the
///   reactive `Signal<UseClipboardStatus>`.
pub fn use_clipboard() -> UseClipboard {
    HookContext::use_hook(UseClipboard::new)
}