Skip to content

Commit 65d8460

Browse files
committed
Merge remote-tracking branch 'origin/master' into expose-language-flag-props
2 parents 859bf88 + 12b13b1 commit 65d8460

8 files changed

Lines changed: 128 additions & 52 deletions

File tree

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
build/
22
dist/
33
node_modules/
4+
docs/node_modules/
45
.snapshots/
56
*.min.js
67
coverage/

.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"prettier/react"
99
],
1010
"env": {
11-
"node": true
11+
"node": true,
12+
"browser": true
1213
},
1314
"parserOptions": {
1415
"ecmaVersion": 2020,
@@ -28,6 +29,7 @@
2829
"react/jsx-handler-names": 0,
2930
"react/jsx-fragments": 0,
3031
"react/no-unused-prop-types": 0,
32+
"no-unused-expressions": 0,
3133
"import/export": 0
3234
}
3335
}

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ import { CircleFlag } from 'react-circle-flags'
2828
export const ArgentinianFlag = () => <CircleFlag countryCode="ar" height="35" cdnUrl="https://magic-cdn.com/flags/" />
2929
```
3030

31+
### With inline svgs instead of using images
32+
33+
```jsx
34+
import React from 'react'
35+
import { CircleFlag } from 'react-circle-flags'
36+
37+
export const ArgentinianFlag = () => <CircleFlag countryCode="ar" height="35" cdnUrl="https://magic-cdn.com/flags/" />
38+
```
39+
3140
You can pass all the react's `React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>` props to CircleFlag. :rocket:
3241

3342
### Language flags

docs/.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rules": {
3+
"no-unused-expressions": "off"
4+
}
5+
}

index.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ interface CircleFlagProps extends DetailedHTMLProps<
1212
* Custom CDN URL to use.
1313
*/
1414
cdnUrl?: string
15+
/**
16+
* Whether to use inline SVG rendering.
17+
*/
18+
inline?: boolean
1519
}
1620

1721
interface CircleFlagLanguageProps extends DetailedHTMLProps<
@@ -26,6 +30,10 @@ interface CircleFlagLanguageProps extends DetailedHTMLProps<
2630
* Custom CDN URL to use.
2731
*/
2832
cdnUrl?: string
33+
/**
34+
* Whether to use inline SVG rendering.
35+
*/
36+
inline?: boolean
2937
}
3038

3139
/**

package-lock.json

Lines changed: 15 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
22
"name": "react-circle-flags",
3-
"version": "0.0.26",
3+
"version": "0.0.27",
44
"description": "A React component with a collection of 300+ minimal circular SVG country flags",
55
"author": "Tomás Novau(tnovau@ontheedge.cloud)",
66
"license": "MIT",
7-
"repository": "on-the-edge-cloud/react-circle-flags",
7+
"repository": {
8+
"type": "git",
9+
"url": "git+https://github.com/on-the-edge-cloud/react-circle-flags.git"
10+
},
811
"main": "dist/index.js",
912
"module": "dist/index.modern.js",
1013
"source": "src/index.js",
@@ -67,5 +70,8 @@
6770
"flags",
6871
"countries",
6972
"react-component-library"
70-
]
73+
],
74+
"volta": {
75+
"node": "18.20.8"
76+
}
7177
}

0 commit comments

Comments
 (0)