Skip to content

Commit 40ff080

Browse files
author
Breno Calazans
authored
Merge pull request #39 from vtex-apps/feature/bookmark
Add Bookmark
2 parents b9ea402 + 23c50f1 commit 40ff080

File tree

12 files changed

+43
-215
lines changed

12 files changed

+43
-215
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+
- Icon Bookmark.
911

1012
## [0.14.0] - 2019-11-22
1113
### Added

README.md

Lines changed: 0 additions & 207 deletions
This file was deleted.

ICONPACK.md renamed to docs/ICONPACK.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ We use a series of prefixes to help us understand what an specific icon means.
7777
| ![](docs/mpa-clone--outline.svg) | mpa-clone--outline |
7878
| ![](docs/mpa-clone--filled.svg) | mpa-clone--filled |
7979
| ![](docs/mpa-edit--outline.svg) | mpa-edit--outline |
80+
| ![](docs/mpa-bookmark--filled.svg) | mpa-bookmark--filled |
81+
| ![](docs/mpa-bookmark--outline.svg) | mpa-bookmark--outline |
8082
| ![](docs/mpa-edit--filled.svg) | mpa-edit--filled |
8183
| ![](docs/mpa-external-link--line.svg) | mpa-external-link--line |
8284
| ![](docs/mpa-external-link--outline.svg) | mpa-external-link--outline |

docs/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ All Store icons components.
4343

4444
## Concept
4545

46-
This project is based on [SVG fragment identifiers](https://css-tricks.com/svg-fragment-identifiers-work/). All store icons are served by Render SDK, and with HTML tag `<use>` we can render a fragment from our icon pack. If you want to know the complete list of fragment SVG's, [see here](https://github.com/vtex-apps/store-icons/blob/master/ICONPACK.md)
46+
This project is based on [SVG fragment identifiers](https://css-tricks.com/svg-fragment-identifiers-work/). All store icons are served by Render SDK, and with HTML tag `<use>` we can render a fragment from our icon pack. If you want to know the complete list of fragment SVG's, [see here](https://github.com/vtex-apps/store-icons/blob/master/docs/ICONPACK.md)
4747

4848
## Usage
4949

@@ -145,6 +145,7 @@ Some components support modifiers. These are props that define the icon type, or
145145
| [IconSwap](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconSwap.js) | `swap` | 🚫 | 🚫 | 🚫 | 🚫 |
146146
| [IconHeart](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconHeart.js) | `heart` | 🚫 | 🚫 | 🚫 | 🚫 |
147147
| [IconGlobe](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconGlobe.js) | `globe` | 🚫 | 🚫 | 🚫 | 🚫 |
148+
| [IconBookmark](https://github.com/vtex-apps/store-icons/blob/feature/docs/react/IconBookmark.js) | `bookmark` | filled \| outline | 🚫 | 🚫 | 🚫 |
148149

149150
#### Navigation
150151

@@ -165,7 +166,7 @@ In the [usage](#usage) section, we discuss two ways of using icons. These ways e
165166

166167
### Overwriting the default IconPack
167168

168-
As mentioned before, all icon IDs are stored at the [iconpack.svg](https://github.com/vtex-apps/store-icons/blob/master/ICONPACK.md) file. You can overwrite the default one by:
169+
As mentioned before, all icon IDs are stored at the [iconpack.svg](https://github.com/vtex-apps/store-icons/blob/master/docs/ICONPACK.md) file. You can overwrite the default one by:
169170

170171
1. On your [`store-theme`](https://github.com/vtex-apps/store-theme/tree/master/styles) create a new folder called `iconpacks`
171172

docs/mpa-bookmark--filled.svg

Lines changed: 5 additions & 0 deletions
Loading

docs/mpa-bookmark--outline.svg

Lines changed: 5 additions & 0 deletions
Loading

docs/script/scrap-svg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ $('g').toArray().map(element => {
2323
})
2424

2525
const BASELINE_PATH = path.join(__dirname, 'baseline.md')
26-
const ICONPACK_PATH = path.join(__dirname, '..', '..', 'ICONPACK.md')
26+
const ICONPACK_PATH = path.join(__dirname, '..', 'ICONPACK.md')
2727

2828
fs.copyFile(BASELINE_PATH, ICONPACK_PATH, (err) => {
2929
if (err) throw err

react/IconBookmark.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react'
2+
3+
import Icon from './components/Icon'
4+
import { getType } from './utils/helpers'
5+
6+
const IconBoomark = ({ type = 'outline', ...props }: EnhancedIconProps) => {
7+
const typeModifier = getType(type, 'filled, outline')
8+
return <Icon id={`mpa-bookmark${typeModifier}`} {...props} />
9+
}
10+
11+
export default IconBoomark

react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"tslint": "^5.11.0",
3131
"tslint-config-vtex": "^2.0.0",
3232
"tslint-eslint-rules": "^5.4.0",
33-
"typescript": "3.5.2"
33+
"typescript": "3.7.3"
3434
},
3535
"resolutions": {
3636
"babel-core": "^7.0.0-bridge.0"

react/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4919,10 +4919,10 @@ type-check@~0.3.2:
49194919
dependencies:
49204920
prelude-ls "~1.1.2"
49214921

4922-
typescript@3.5.2:
4923-
version "3.5.2"
4924-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c"
4925-
integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==
4922+
typescript@3.7.3:
4923+
version "3.7.3"
4924+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.3.tgz#b36840668a16458a7025b9eabfad11b66ab85c69"
4925+
integrity sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==
49264926

49274927
typescript@^3.3.3333:
49284928
version "3.5.3"

0 commit comments

Comments
 (0)