project_note
Clone
https://git.tahinli.com/Tahinli/project_note.git
0 watching0 forksRust3.6 MiBc49f5e7Tahinli1 month ago2 commits
| 1 | use |
| 2 | |
| 3 | |
| 4 | ; |
| 5 | |
| 6 | /// The visual style of a [`badge`]. |
| 7 | /// |
| 8 | /// [`Default`] is `BadgeVariant::Primary`, used when no variant is given. |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | /// Classes shared by badge variants. Badges use the mono face at 11px. |
| 37 | const BASE: StaticClass = class! |
| 38 | |
| 39 | |
| 40 | ; |
| 41 | |
| 42 | /// Builds the full class list for a badge of the given `variant`. |
| 43 | /// |
| 44 | /// Use it to give badge styling to another element, such as a link: |
| 45 | /// |
| 46 | /// ```ignore |
| 47 | /// view! { |
| 48 | /// <a href="/releases/v2" class=(badge_variants(BadgeVariant::Outline))>"v2.0"</a> |
| 49 | /// } |
| 50 | /// ``` |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | /// A small mono label for a status or count. |
| 57 | /// |
| 58 | /// `variant` defaults to `Primary`. Pass the label as children and extra attributes |
| 59 | /// through `attrs`. Attributes go on the `<span>`, with classes added to its classes. |
| 60 | /// Use [`badge_variants`] to apply the same styling to another element. |
| 61 | /// |
| 62 | /// ```ignore |
| 63 | /// view! { |
| 64 | /// badge(variant: BadgeVariant::Destructive, "Failed") |
| 65 | /// } |
| 66 | /// ``` |
| 67 | |
| 68 | pub async |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 |