Skip to content

Commit 0624dae

Browse files
authored
Merge pull request #42 from vtex-apps/feature/css-handles
Add CSS handles
2 parents cbbb1b8 + cd77c14 commit 0624dae

34 files changed

+138
-65
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
9+
### Added
10+
- CSS handles to all icons.
911

1012
## [0.15.0] - 2019-12-27
1113
### Added

docs/README.md

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1+
📢 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+
13
# Store Icons
24

35
[![Build Status](https://travis-ci.org/vtex-apps/store-icons.svg?branch=master)](https://travis-ci.org/vtex-apps/store-icons)
46

5-
## Description
6-
77
All Store icons components.
88

9-
**Disclaimer:** Don't fork this project, use, contribute, or open issue with your feature request.
10-
11-
## Release schedule
12-
13-
| Release | Status | Initial Release | Maintenance LTS Start | End-of-life | Store Compatibility |
14-
| :-----: | :-----------------: | :-------------: | :-------------------: | :---------: | :-----------------: |
15-
| [0.x] | **Current Release** | 2019-01-30 | ----------- | ---------- | 2.x |
16-
179
## Table of Contents
1810

1911
- [Store Icons](#store-icons)
@@ -197,14 +189,36 @@ Where the `modifiers` follows the rule:
197189

198190
`sti` **Status indicators** - Indicates the current item/component semantic status.
199191

200-
## Troubleshooting
201-
202-
You can check if others are passing through similar issues [here](https://github.com/vtex-apps/store-icons/issues). Also feel free to [open issues](https://github.com/vtex-apps/store-icons/issues/new) or contribute with pull requests.
203-
204-
## Contributing
205-
206-
Check it out [how to contribute](https://github.com/vtex-apps/awesome-io#contributing) with this project.
207-
208-
## Tests
209-
210-
To execute our tests go to `react/` folder and run `yarn test`
192+
## CSS Customization
193+
194+
In order to apply CSS customizations in this and other blocks, follow the instructions given in the recipe on [Using CSS Handles for store customization](https://vtex.io/docs/recipes/style/using-css-handles-for-store-customization).
195+
196+
| CSS Handles |
197+
| -------------------- |
198+
| 'arrowBackIcon' |
199+
| 'assistantSalesIcon' |
200+
| 'caretIcon' |
201+
| 'cartIcon' |
202+
| 'checkIcon' |
203+
| 'closeIcon' |
204+
| 'deleteIcon' |
205+
| 'equalsIcon' |
206+
| 'eyeSightIcon' |
207+
| 'filterIcon' |
208+
| 'globeIcon' |
209+
| 'gridIcon' |
210+
| 'heartIcon' |
211+
| 'homeIcon' |
212+
| 'inlineGridIcon' |
213+
| 'locationInputIcon' |
214+
| 'locationMarkerIcon' |
215+
| 'menuIcon' |
216+
| 'minusIcon' |
217+
| 'plusIcon' |
218+
| 'profileIcon' |
219+
| 'removeIcon' |
220+
| 'searchIcon' |
221+
| 'singleGridIcon' |
222+
| 'socialIcon' |
223+
| 'starIcon' |
224+
| 'swapIcon' |

manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"prereleasy": "yarn && node docs/script/scrap-svg.js",
1010
"postreleasy": "vtex publish --verbose"
1111
},
12+
"dependencies": {
13+
"vtex.css-handles": "0.x"
14+
},
1215
"builders": {
1316
"react": "3.x",
1417
"styles": "1.x",

react/IconArrowBack.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react'
33
import Icon from './components/Icon'
44

55
const IconArrowBack = (props: IconProps) => {
6-
return <Icon id="hpa-arrow-back" {...props} />
6+
return <Icon id="hpa-arrow-back" handle="arrowBackIcon" {...props} />
77
}
88

99
export default IconArrowBack

react/IconAssistantSales.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react'
33
import Icon from './components/Icon'
44

55
const IconAssistantSales = (props: IconProps) => {
6-
return <Icon id="hpa-telemarketing" {...props} />
6+
return <Icon id="hpa-telemarketing" handle="assistantSalesIcon" {...props} />
77
}
88

99
export default IconAssistantSales

react/IconCaret.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ const IconCaret = ({ orientation, thin = false, ...props }: CaretProps) => {
77
const orientationModifier = getOrientation(orientation)
88
const id: string = classnames({
99
[`nav-thin-caret${orientationModifier}`]: thin,
10-
[`nav-caret${orientationModifier}`]: !thin
10+
[`nav-caret${orientationModifier}`]: !thin,
1111
})
12-
return <Icon id={id} {...props} />
12+
return <Icon id={id} handle="caretIcon" {...props} />
1313
}
1414

1515
export default IconCaret

react/IconCart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react'
33
import Icon from './components/Icon'
44

55
const IconCart = (props: IconProps) => {
6-
return <Icon id="hpa-cart" {...props} />
6+
return <Icon id="hpa-cart" handle="cartIcon" {...props} />
77
}
88

99
export default IconCart

react/IconCheck.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import Icon from './components/Icon'
55

66
const IconCheck = ({ type, ...props }: EnhancedIconProps) => {
77
const typeModifier = getType(type)
8-
return <Icon id={`sti-check${typeModifier}`} {...props} />
8+
return <Icon handle="checkIcon" id={`sti-check${typeModifier}`} {...props} />
99
}
1010

11-
12-
1311
export default IconCheck

react/IconClose.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { getType } from './utils/helpers'
55

66
const IconClose = ({ type = 'filled', ...props }: EnhancedIconProps) => {
77
const typeModifier = getType(type)
8-
return <Icon id={`sti-close${typeModifier}`} {...props} />
8+
return <Icon handle="closeIcon" id={`sti-close${typeModifier}`} {...props} />
99
}
1010

1111
export default IconClose

react/IconDelete.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react'
33
import Icon from './components/Icon'
44

55
const IconDelete = (props: IconProps) => {
6-
return <Icon id="hpa-delete" {...props} />
6+
return <Icon id="hpa-delete" handle="deleteIcon" {...props} />
77
}
88

99
export default IconDelete

0 commit comments

Comments
 (0)