Skip to content

Commit e69d313

Browse files
authored
Merge pull request #53 from vtex-apps/media-icons
Add media icons
2 parents 1e6827f + 42e5c3a commit e69d313

File tree

9 files changed

+89
-11
lines changed

9 files changed

+89
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Added
11+
- Icon Play, Icon Pause, Icon Volume On and Icon Volume Off.
12+
1013
## [0.17.1] - 2020-09-23
1114
### Changed
1215
- Inline loading icon animation, prevent from loading global CSS files for icons.

docs/README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
📢 Use this project, [contribute](https://github.com/vtex-apps/store-icons) to it or open issues to help evolve it using [Store Discussion](https://github.com/vtex-apps/store-discussion).
2+
23
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4+
35
[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)
6+
47
<!-- ALL-CONTRIBUTORS-BADGE:END -->
58

69
# Store Icons
@@ -59,7 +62,7 @@ Import the desired icon and use it into your code, for example:
5962
```js
6063
import { IconMenu } from 'vtex.store-icons'
6164

62-
const YourComponent = props => <IconMenu />
65+
const YourComponent = (props) => <IconMenu />
6366
```
6467

6568
You can see [here](#icon-list) a list of every available icon.
@@ -73,7 +76,7 @@ For example:
7376
```js
7477
import { Icon } from 'vtex.store-icons'
7578

76-
const YourComponent = props => <Icon id="hpa-cart" />
79+
const YourComponent = (props) => <Icon id="hpa-cart" />
7780
```
7881

7982
⚠️ This component is meant to be used on icons there aren't common throughout the store. Choose [`dedicated`](#dedicated-icon) components whenever possible.
@@ -141,6 +144,8 @@ Some components support modifiers. These are props that define the icon type, or
141144
| [IconHeart](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconHeart.js) | `heart` | 🚫 | 🚫 | 🚫 | 🚫 |
142145
| [IconGlobe](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconGlobe.js) | `globe` | 🚫 | 🚫 | 🚫 | 🚫 |
143146
| [IconBookmark](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconBookmark.js) | `bookmark` | filled \| outline | 🚫 | 🚫 | 🚫 |
147+
| [IconPlay](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconPlay.js) | `play` | filled \| outline | 🚫 | 🚫 | 🚫 |
148+
| [IconPause](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconPause.js) | `pause` | filled \| outline | 🚫 | 🚫 | 🚫 |
144149

145150
#### Navigation
146151

@@ -150,10 +155,12 @@ Some components support modifiers. These are props that define the icon type, or
150155

151156
#### Status Indicators
152157

153-
| Component | id | Type | Orientation | State | Shape |
154-
| ------------------------------------------------------------------------------------------ | ------- | ------------------------- | ----------- | ----- | ----- |
155-
| [IconClose](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconClose.js) | `close` | filled \| outline | 🚫 | 🚫 | 🚫 |
156-
| [IconCheck](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconCheck.js) | `check` | filled \| outline \| line | 🚫 | 🚫 | 🚫 |
158+
| Component | id | Type | Orientation | State | Shape |
159+
| -------------------------------------------------------------------------------------------------- | ------------ | ------------------------- | ----------- | ----- | ----- |
160+
| [IconClose](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconClose.js) | `close` | filled \| outline | 🚫 | 🚫 | 🚫 |
161+
| [IconCheck](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconCheck.js) | `check` | filled \| outline \| line | 🚫 | 🚫 | 🚫 |
162+
| [IconVolumeOn](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconVolumeOn.js) | `volume-on` | filled \| outline \| line | 🚫 | 🚫 | 🚫 |
163+
| [IconVolumeOff](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconVolumeOff.js) | `volume-off` | filled \| outline \| line | 🚫 | 🚫 | 🚫 |
157164

158165
## Customize
159166

@@ -225,6 +232,11 @@ In order to apply CSS customizations in this and other blocks, follow the instru
225232
| 'socialIcon' |
226233
| 'starIcon' |
227234
| 'swapIcon' |
235+
| 'playIcon' |
236+
| 'pauseIcon' |
237+
| 'fullscreenIcon' |
238+
| 'volumeOnIcon' |
239+
| 'volumeOffIcon' |
228240

229241
## Contributors ✨
230242

@@ -235,6 +247,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
235247
<!-- markdownlint-disable -->
236248
<!-- markdownlint-enable -->
237249
<!-- prettier-ignore-end -->
250+
238251
<!-- ALL-CONTRIBUTORS-LIST:END -->
239252

240-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
253+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

react/IconPause.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react'
2+
3+
import Icon from './components/Icon'
4+
5+
const IconPause = (props: IconProps) => {
6+
return <Icon id="mpa-pause" handle="pauseIcon" {...props} />
7+
}
8+
9+
export default IconPause

react/IconPlay.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react'
2+
3+
import Icon from './components/Icon'
4+
5+
const IconPlay = (props: IconProps) => {
6+
return <Icon id="mpa-play" handle="playIcon" {...props} />
7+
}
8+
9+
export default IconPlay

react/IconVolumeOff.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react'
2+
3+
import Icon from './components/Icon'
4+
5+
const IconVolumeOff = (props: IconProps) => {
6+
return <Icon id="sti-volume-off" handle="volumeOffIcon" {...props} />
7+
}
8+
9+
export default IconVolumeOff

react/IconVolumeOn.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react'
2+
3+
import Icon from './components/Icon'
4+
5+
const IconVolumeOn = (props: IconProps) => {
6+
return <Icon id="sti-volume-on" handle="volumeOnIcon" {...props} />
7+
}
8+
9+
export default IconVolumeOn

react/components/Icon.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ const CSS_HANDLES = [
3333
'socialIcon',
3434
'starIcon',
3535
'swapIcon',
36+
'playIcon',
37+
'pauseIcon',
38+
'volumeOnIcon',
39+
'volumeOffIcon',
3640
] as const
3741

3842
const Icon = ({
@@ -52,9 +56,9 @@ const Icon = ({
5256
width={size}
5357
height={size}
5458
viewBox={viewBox}
55-
className={`${
56-
isActive ? activeClassName || '' : mutedClassName || ''
57-
} ${handles[handle] || ''}`}
59+
className={`${isActive ? activeClassName || '' : mutedClassName || ''} ${
60+
handles[handle] || ''
61+
}`}
5862
>
5963
<Use id={id} />
6064
</Svg>

store/interfaces.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,17 @@
8888
},
8989
"icon-expand": {
9090
"component": "IconExpand"
91+
},
92+
"icon-volume-on": {
93+
"component": "IconVolumeOn"
94+
},
95+
"icon-volume-off": {
96+
"component": "IconVolumeOff"
97+
},
98+
"icon-play": {
99+
"component": "IconPlay"
100+
},
101+
"icon-pause": {
102+
"component": "IconPause"
91103
}
92104
}

styles/iconpacks/iconpack.svg

Lines changed: 11 additions & 1 deletion
Loading

0 commit comments

Comments
 (0)