From e99a3c66de314769d3f2658cf76b7980d6b43073 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Mon, 16 Oct 2017 12:25:22 -0400 Subject: [PATCH] Add more alert styles, extract reusable code sample partial --- docs/source/_partials/code-sample.blade.php | 8 ++ docs/source/examples/alerts.blade.md | 103 ++++++++++++-------- 2 files changed, 71 insertions(+), 40 deletions(-) create mode 100644 docs/source/_partials/code-sample.blade.php diff --git a/docs/source/_partials/code-sample.blade.php b/docs/source/_partials/code-sample.blade.php new file mode 100644 index 000000000..32ddaf4fb --- /dev/null +++ b/docs/source/_partials/code-sample.blade.php @@ -0,0 +1,8 @@ +
+
+ {{ $slot }} +
+
+
{{ e($code ?? $slot) }}
+
+
diff --git a/docs/source/examples/alerts.blade.md b/docs/source/examples/alerts.blade.md index d63bee23c..e5f79595c 100644 --- a/docs/source/examples/alerts.blade.md +++ b/docs/source/examples/alerts.blade.md @@ -9,53 +9,76 @@ We don't ship alert components because every app has it's own visual style, and Here's a bunch of examples: -### Bootstrap Style +### Bootstrap-style -
-
-
- Holy smokes! Something seriously bad happened. -
-
-
-
{{
-'
+@component('_partials.code-sample', ['lang' => 'html']) +
Holy smokes! Something seriously bad happened. -
' - }}
+ + + +
+@endcomponent + +--- + +### HelpScout-style + +@component('_partials.code-sample', ['lang' => 'html']) +
+

Be Warned

+

Something not ideal might be happening.

+
+@endcomponent + +--- + +### HelpScout-style + +@component('_partials.code-sample', ['lang' => 'html']) +
+
+ Danger +
+
+

Something not ideal might be happening.

+@endcomponent -### HelpScout Style +--- -
-
-
- Something not ideal might be happening. -
-
-
-
{{
-'
- Something not ideal might be happening. -
' - }}
-
-
+### Heroku-style -### Heroku Style - -
-
-
- Something happened that you should know about but is probably good or at least not bad. -
-
-
-
{{
-'
+@component('_partials.code-sample', ['lang' => 'html']) +
Something happened that you should know about but is probably good or at least not bad. -
' - }}
+
+@endcomponent + +--- + +### Shopify-style + +@component('_partials.code-sample', ['lang' => 'html']) +
+
+ +
+

USPS has updated their rates

+

Make sure you know how these changes affect your store.

+
+@endcomponent + +--- + +### Banner-style + +@component('_partials.code-sample', ['lang' => 'html']) +
+

Informational message

+

Some additional text to explain said message.

+
+@endcomponent