Skip to content

Commit

Permalink
docs(icon): Add old Icon component back and mark it as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
lzcabrera committed Sep 26, 2017
1 parent 06fc2d3 commit ad91f88
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 5 deletions.
3 changes: 2 additions & 1 deletion config/styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ module.exports = {
components() {
return compact([
toggleByEnv('Icon', path.resolve('src/components/Icons/DecorativeIcon/DecorativeIcon.jsx')),
toggleByEnv('Icon', path.resolve('src/components/Icons/StandaloneIcon/StandaloneIcon.jsx'), path.resolve('src/old-components/Icon/Icon.jsx'))
toggleByEnv('Icon', path.resolve('src/components/Icons/StandaloneIcon/StandaloneIcon.jsx')),
path.resolve('src/old-components/Icon/Icon.jsx')
])
}
},
Expand Down
2 changes: 1 addition & 1 deletion docs/elements/buttons.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span class="docs--badge cardinal">deprecated</span>
<span class="docs--badge__deprecated">deprecated</span>

**The button CSS classes are deprecated and should not be used. Use the [Button](#button) component instead.**

Expand Down
2 changes: 1 addition & 1 deletion docs/elements/links.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span class="docs--badge cardinal">deprecated</span>
<span class="docs--badge__deprecated">deprecated</span>

**The link CSS classes are deprecated and should not be used. Use the [Links](#links-1) component instead.**

Expand Down
2 changes: 1 addition & 1 deletion docs/elements/lists.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span class="docs--badge cardinal">deprecated</span>
<span class="docs--badge__deprecated">deprecated</span>

## Overview
---
Expand Down
2 changes: 1 addition & 1 deletion docs/elements/typography.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span class="docs--badge cardinal">deprecated</span>
<span class="docs--badge__deprecated">deprecated</span>

** The typography CSS classes are deprecated and should not be used. Use the [Typography](#typography-1) components instead. **

Expand Down
6 changes: 6 additions & 0 deletions docs/scss/_badges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@

background-color: $color-cardinal;
}

&__deprecated {
@extend .docs--badge;

background-color: $color-cardinal;
}
}
6 changes: 6 additions & 0 deletions src/old-components/Icon/Icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import React from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'

/**
* <span class="docs--badge__deprecated">deprecated</span>
*
* **This component is deprecated and should not be used. Use the
* [DecorativeIcon](#decorativeicon) or [StandaloneIcon](#standaloneicon) instead.**
*/
const Icon = ({ glyph, variant, fixedWidth, size, className, children, ...rest }) => {
const classes = classNames(
'icon',
Expand Down

0 comments on commit ad91f88

Please sign in to comment.