project_note
Clone
https://git.tahinli.com/Tahinli/project_note.git
0 watching0 forksJavaScript3.6 MiBe100df4Tahinli1 month ago1 commit
| 1 | use |
| 2 | |
| 3 | |
| 4 | ; |
| 5 | |
| 6 | use |
| 7 | |
| 8 | ; |
| 9 | |
| 10 | /// A short hint shown when its trigger is hovered or focused. |
| 11 | /// |
| 12 | /// Add the trigger and a [`tooltip_content`] as children. |
| 13 | /// |
| 14 | /// Give the trigger its own text or accessible label. The tooltip must not be the only |
| 15 | /// way to learn what the trigger does. To associate the hint with the trigger, give |
| 16 | /// `tooltip_content` an `id` from [`element_id`](topcoat::view::element_id) and |
| 17 | /// reference it with the trigger's `aria-describedby`. |
| 18 | /// |
| 19 | /// ```ignore |
| 20 | /// view! { |
| 21 | /// tooltip( |
| 22 | /// button( |
| 23 | /// size: ButtonSize::Icon, |
| 24 | /// variant: ButtonVariant::Outline, |
| 25 | /// icon(data: iconify_icon!("lucide:copy"), label: "Copy link") |
| 26 | /// ) |
| 27 | /// tooltip_content("Copy link") |
| 28 | /// ) |
| 29 | /// } |
| 30 | /// ``` |
| 31 | |
| 32 | pub async |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | /// Styles for a hint that fades in and out and lets pointer events pass through. |
| 47 | /// Using `display: none` while hidden makes the browser recalculate its position when |
| 48 | /// it appears. `@starting-style` starts the fade from transparent. |
| 49 | const BUBBLE: StaticClass = class! |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | ; |
| 58 | |
| 59 | /// The hint shown beside a [`tooltip`]'s trigger. |
| 60 | /// |
| 61 | /// Use `side` to choose where the hint appears and `align` to line it up with the |
| 62 | /// trigger. By default, it appears above the trigger and is centered on it. The browser |
| 63 | /// tries other positions if there is not enough room in the window. |
| 64 | |
| 65 | pub async |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 |