From 0981c933abdae5e3832029335ba2d44571a943e7 Mon Sep 17 00:00:00 2001 From: Brian Han Date: Mon, 5 Jun 2017 10:56:51 -0500 Subject: [PATCH] docs(migration-guides): recommend inline svg (#141) * docs(accordion): update migration guide, recommend inline svg * docs(button): migration guide mentions inline svg * docs(checkbox): migration guide mentions inline svg * test(copy-button): update HTML string for unit tests --- src/components/accordion/migrate-to-7.x.md | 11 ++++++++++- src/components/button/README.md | 17 +++++++++++++++-- src/components/checkbox/README.md | 10 ++++++---- tests/spec/copy-button_spec.js | 16 ++++++++++------ 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/src/components/accordion/migrate-to-7.x.md b/src/components/accordion/migrate-to-7.x.md index 14d72d136e7b..1b4dd7bb0570 100644 --- a/src/components/accordion/migrate-to-7.x.md +++ b/src/components/accordion/migrate-to-7.x.md @@ -1,6 +1,15 @@ ### HTML -Updating HTML pertains mainly to SVG icon paths. It's recommended to use bluemix-icons locally in your project. +Updating HTML pertains mainly to SVG icon paths. +It's now recommended to use inline SVG icons. + +```html + + + +``` + +But if you're going to make use of carbon-icons.svg, it's recommended to use the sprite svg file locally in your project. Update `` to a local path of bluemix-icons.svg, which should look something like this: diff --git a/src/components/button/README.md b/src/components/button/README.md index 7a6b008991c2..1608daf1c858 100644 --- a/src/components/button/README.md +++ b/src/components/button/README.md @@ -26,15 +26,28 @@ Use these modifiers with `.bx--btn` class. #### Using icons with buttons -All buttons can use icons. +All buttons can use icons. It's recommended to inline SVG icons when possible. Simply add the appropriate `` to the button HTML with the `bx--btn__icon` class. +You can also include `` for better accessibility to describe what the button does. + +```html + +``` + Be aware that only `--glyph` icons should be used with buttons. +Here's an example using `carbon-icons.svg`. ```html ``` diff --git a/src/components/checkbox/README.md b/src/components/checkbox/README.md index b556c0ddb8bb..62c7e28efbe8 100644 --- a/src/components/checkbox/README.md +++ b/src/components/checkbox/README.md @@ -20,8 +20,8 @@ With `input` and `label` as siblings