playbook_ui_docs 13.16.0.pre.alpha.play1141iconkitusinglibrary1995 → 13.16.0.pre.alpha.play1141iconkitusinglibrary2038
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28f5c1f1d141bab451d9254bbf89271080d43e3c4711b34ad217606803434f65
|
4
|
+
data.tar.gz: be38c2201d96439699602986fa0984bdeef653f5281389964d3192620e64e15f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44a9d7c236f644faaf61007d95cf574ea26e7e1b646db7755ea8bcc05b7e4e68911fab22282a3873295adcd23f696de71379c2e9d07c22471fcb0e95eae983a6
|
7
|
+
data.tar.gz: 923f31ce50f43a63c121a1de094dac50490387b1ad67a8274735086e7446dc4cdb2ae8296dc112524fbcab38e0994d4ffdf78a9dd8586a99755a51cc5ad27d68
|
@@ -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
|
|