-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dark mode and themes in basic component with slots.
- Loading branch information
Peter Thomson
committed
May 22, 2024
1 parent
3ff085e
commit 1618ec1
Showing
4 changed files
with
70 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"theme": "base", | ||
"themeName": "Dark Mode", | ||
"themeVariables": { | ||
"primaryColor": "#212529", | ||
"primaryBorderColor": "#343a40", | ||
"primaryTextColor": "#f8f9fa", | ||
"lineColor": "#000000", | ||
"secondaryColor": "#495057", | ||
"tertiaryColor": "#212529" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
<div class="mermaid {{ $class ?? '' }}"> | ||
{{ isset($data) ? $data : $slot }} | ||
@if(isset($data)) | ||
{{ $data }} | ||
@else | ||
{{ \IcehouseVentures\LaravelMermaid\Support\Builder::setTheme($theme ?? '') }} | ||
{{ $slot }} | ||
@endif | ||
</div> | ||
|
||
@once | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script> | ||
|
||
<script> | ||
mermaid.initialize({ | ||
startOnLoad: true | ||
}); | ||
</script> | ||
|
||
@endonce | ||
@endonce |