playbook_ui_docs 13.16.0.pre.alpha.play1141iconkitusinglibrary1995 → 13.16.0.pre.alpha.play1141iconkitusinglibrary2037
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 640a5190d5977345bfdb6dd2d9faf39a2ebb1382f61c4ad099c7af0d0f64c369
|
4
|
+
data.tar.gz: cfdb3a49b0febce58c0f9ff830aa46512cad17f590f80893228819e7d55fc0df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cfe31671e7b5a4ad57df82719c8a59fffcd6e849d0fbe1c04663594dd112e7972231781652bd860b363363ec8337f150663e716618648a1b9f2f0f926eea1bf
|
7
|
+
data.tar.gz: 0a55be6e793edc7620c7992936a2638bb49ec717304cf8a27933ce456b4398ace51fcb64fe25d2e7279365d244f00b1d48e22eba42847237b6a5444ee1b31158
|
@@ -1,5 +1,15 @@
|
|
1
1
|
# Tips for Custom Icons
|
2
2
|
|
3
|
+
When using custom icons it is important to introduce a "clean" SVG. In order to ensure these custom icons perform as intended within your kit(s), ensure these things have been modified from the original SVG markup:
|
4
|
+
|
5
|
+
Attributes must be React compatible e.g. <code>xmlns:xlink</code> should be <code>xmlnsXlink</code> and so on. <strong>There should be no hyphenated attributes and no semi-colons!.</strong>
|
6
|
+
|
7
|
+
Fill colors with regards to <code>g</code> or <code>path</code> nodes, e.g. <code>fill="black"</code>, should be replaced with <code>currentColor</code> ala <code>fill="currentColor"</code>. Your mileage may vary depending on the complexity of your SVG.
|
8
|
+
|
9
|
+
Pay attention to your custom icon's dimensions and `viewBox` attribute. It is best to use a `viewBox="0 0 512 512"` starting point **when designing instead of trying to retrofit the viewbox afterwards**!
|
10
|
+
|
11
|
+
You must source _your own SVG into component/view_ you are working on. This can easily be done in programmatic and maintainable ways.
|
12
|
+
|
3
13
|
### React
|
4
14
|
|
5
15
|
- Providing a valid React `<SVG>` element to the `icon` prop results in an `<SVG>` node within the working view.
|
@@ -73,8 +73,10 @@ const TypeaheadWithHighlight = (props) => {
|
|
73
73
|
Option: (highlightProps: OptionProps) => (
|
74
74
|
<components.Option {...highlightProps}/>
|
75
75
|
),
|
76
|
-
SingleValue: ({
|
77
|
-
<
|
76
|
+
SingleValue: ({ ...props }) => (
|
77
|
+
<components.SingleValue {...props}>
|
78
|
+
<span>{props.data.name}</span>
|
79
|
+
</components.SingleValue>
|
78
80
|
)
|
79
81
|
}
|
80
82
|
|