Skip to content

Commit

Permalink
feat: add examples for dismissable and actions in notices.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Jan 9, 2025
1 parent ad65eb1 commit 6c930a4
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 43 deletions.
48 changes: 48 additions & 0 deletions views/pages/components/usage/notice/actions.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@notice([
'type' => 'info',
'message' => [
'text' => 'This message size is set to sm.',
],
'action' => [
'text' => 'Undo',
'url' => '#'
],
'dismissable' => true,
'icon' => [
'name' => 'check',
'size' => 'md',
'color' => 'white'
]
])
@endnotice

@notice([
'type' => 'info',
'message' => [
'text' => 'This message size is set to sm.',
],
'dismissable' => true,
'icon' => [
'name' => 'check',
'size' => 'md',
'color' => 'white'
]
])
@endnotice

@notice([
'type' => 'info',
'message' => [
'text' => 'This message size is set to sm.',
],
'action' => [
'text' => 'Undo',
'url' => '#'
],
'icon' => [
'name' => 'check',
'size' => 'md',
'color' => 'white'
]
])
@endnotice
40 changes: 0 additions & 40 deletions views/pages/components/usage/notice/messageSize.blade.php

This file was deleted.

6 changes: 3 additions & 3 deletions views/pages/components/usage/notice/notice.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"subHeading": "",
"text": "The title to show above the message"
},
"messageSize": {
"heading": "Message size",
"actions": {
"heading": "Actions & dismiss",
"subHeading": "",
"text": "The size of the message can be set to either sm, md or lg and will also affect the icon since our icon package is a font."
"text": "These can have an action, and be dismissable."
}
}

0 comments on commit 6c930a4

Please sign in to comment.