From df6abb6bae16957a283acef5acaed04d2d35f5f1 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 2 Aug 2024 03:48:39 +0200 Subject: [PATCH] fix(NcNoteCard): Adjust padding and margin Adjust the padding and margin to be a bit more condensed. Also fixed the documentation as the text was incomplete. Signed-off-by: Ferdinand Thiessen --- src/components/NcNoteCard/NcNoteCard.vue | 55 ++++++++++++++++-------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/src/components/NcNoteCard/NcNoteCard.vue b/src/components/NcNoteCard/NcNoteCard.vue index b11d2e2481..7b53be0800 100644 --- a/src/components/NcNoteCard/NcNoteCard.vue +++ b/src/components/NcNoteCard/NcNoteCard.vue @@ -7,12 +7,14 @@ This component is made to display additional information to the user. It is available in four versions: -- success: Display a successful message -- info: Display an informational message -- warning: Display a warning to the user. This indicate that the action they want -- error: Display an error message. For example - -When using an error type, +- **success**: Display a successful message.
+ Should be used to show success of an operation or optional information to help a user be more successful. +- **info**: Display an informational message.
+ Should be used to highlight information that users should take into account. +- **warning**: Display a warning to the user.
+ Should be used for critical content demanding user attention due to potential risks. +- **error**: Display an error message.
+ Should be used for negative potential consequences of an action. ### Usage @@ -64,12 +66,13 @@ When using an error type, + :fill-color="color" + :size="20" />
-

+

{{ heading }} -

+

@@ -91,17 +94,26 @@ export default { props: { /** - * Type of the attribute + * Type or severity of the message */ type: { type: String, default: 'warning', validator: type => ['success', 'info', 'warning', 'error'].includes(type), }, + /** + * Enforce the `alert` role on the note card. + * + * The [`alert` role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/alert_role) + * should only be used for information that requires the user's immediate attention. + */ showAlert: { type: Boolean, default: false, }, + /** + * Optional text to show as a heading of the note card + */ heading: { type: String, default: '', @@ -152,20 +164,29 @@ export default {