playbook_ui 13.12.0.pre.alpha.play10281596 → 13.13.0.pre.alpha.play900startratingasinput1657

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.md +1 -0
  3. data/app/pb_kits/playbook/pb_star_rating/_star_rating.scss +105 -53
  4. data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +179 -62
  5. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.html.erb +2 -0
  6. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.jsx +25 -0
  7. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.html.erb +3 -0
  8. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.jsx +31 -0
  9. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.html.erb +6 -8
  10. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx +19 -6
  11. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.html.erb +3 -1
  12. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.jsx +22 -5
  13. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.html.erb +6 -0
  14. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.jsx +58 -0
  15. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.html.erb +16 -0
  16. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.jsx +60 -0
  17. data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +12 -5
  18. data/app/pb_kits/playbook/pb_star_rating/docs/index.js +8 -0
  19. data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +48 -26
  20. data/app/pb_kits/playbook/pb_star_rating/star_rating.rb +82 -6
  21. data/app/pb_kits/playbook/pb_star_rating/star_rating.test.js +34 -34
  22. data/app/pb_kits/playbook/pb_star_rating/stars/primary_star.svg +3 -0
  23. data/app/pb_kits/playbook/pb_star_rating/stars/star_outline.svg +3 -0
  24. data/app/pb_kits/playbook/pb_star_rating/stars/subtle_dark_star.svg +3 -0
  25. data/app/pb_kits/playbook/pb_star_rating/stars/subtle_star.svg +3 -0
  26. data/app/pb_kits/playbook/pb_star_rating/stars/yellow_star.svg +3 -0
  27. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +2 -2
  28. data/dist/playbook-rails.js +5 -5
  29. data/lib/playbook/version.rb +2 -2
  30. metadata +16 -2
@@ -0,0 +1,58 @@
1
+ import React from 'react'
2
+
3
+ import StarRating from '../_star_rating'
4
+
5
+ const StarRatingNumberConfig = (props) => (
6
+ <>
7
+
8
+ <StarRating
9
+ denominator={3}
10
+ paddingBottom="xs"
11
+ rating={3}
12
+ {...props}
13
+ />
14
+
15
+
16
+ <StarRating
17
+ denominator={4}
18
+ paddingBottom="xs"
19
+ rating={3}
20
+ {...props}
21
+ />
22
+
23
+
24
+ <StarRating
25
+ denominator={5}
26
+ paddingBottom="xs"
27
+ rating={3}
28
+ {...props}
29
+ />
30
+
31
+
32
+ <StarRating
33
+ denominator={6}
34
+ paddingBottom="xs"
35
+ rating={3}
36
+ {...props}
37
+ />
38
+
39
+
40
+ <StarRating
41
+ denominator={7}
42
+ paddingBottom="xs"
43
+ rating={3}
44
+ {...props}
45
+ />
46
+
47
+
48
+ <StarRating
49
+ denominator={8}
50
+ paddingBottom="xs"
51
+ rating={3}
52
+ {...props}
53
+ />
54
+
55
+ </>
56
+ )
57
+
58
+ export default StarRatingNumberConfig
@@ -0,0 +1,16 @@
1
+ <%= pb_rails("star_rating", props: { rating: 3, size: "xs", padding_bottom: "xs" }) %>
2
+
3
+
4
+ <%= pb_rails("star_rating", props: { rating: 3, size: "sm", padding_bottom: "xs" }) %>
5
+
6
+
7
+ <%= pb_rails("star_rating", props: { rating: 3, size: "md", padding_bottom: "xs" }) %>
8
+
9
+
10
+ <%= pb_rails("star_rating", props: { rating: 3, size: "lg", padding_bottom: "xs" }) %>
11
+
12
+
13
+ <%= pb_rails("star_rating", props: { rating: 3, size: "lg", layout_option: "number", padding_bottom: "xs" }) %>
14
+
15
+
16
+ <%= pb_rails("star_rating", props: { rating: 3, size: "lg", layout_option: "onestar", padding_bottom: "xs" }) %>
@@ -0,0 +1,60 @@
1
+ import React from 'react'
2
+
3
+ import StarRating from '../_star_rating'
4
+
5
+ const StarRatingSizeOptions = (props) => (
6
+ <>
7
+
8
+ <StarRating
9
+ paddingBottom="xs"
10
+ rating={3}
11
+ size="xs"
12
+ {...props}
13
+ />
14
+
15
+
16
+ <StarRating
17
+ paddingBottom="xs"
18
+ rating={3}
19
+ size="sm"
20
+ {...props}
21
+ />
22
+
23
+
24
+ <StarRating
25
+ paddingBottom="xs"
26
+ rating={3}
27
+ size="md"
28
+ {...props}
29
+ />
30
+
31
+
32
+ <StarRating
33
+ paddingBottom="xs"
34
+ rating={3}
35
+ size="lg"
36
+ {...props}
37
+ />
38
+
39
+
40
+ <StarRating
41
+ layoutOption="number"
42
+ paddingBottom="xs"
43
+ rating={3}
44
+ size="lg"
45
+ {...props}
46
+ />
47
+
48
+
49
+ <StarRating
50
+ layoutOption="onestar"
51
+ paddingBottom="xs"
52
+ rating={3}
53
+ size="lg"
54
+ {...props}
55
+ />
56
+
57
+ </>
58
+ )
59
+
60
+ export default StarRatingSizeOptions
@@ -1,9 +1,16 @@
1
1
  examples:
2
-
3
2
  rails:
4
- - star_rating_default: Default
5
- - star_rating_hide: Hide Rating Value
3
+ - star_rating_default: Default
4
+ - star_rating_color_options: Color Options
5
+ - star_rating_background_options: Background Options
6
+ - star_rating_hide: Layout Options
7
+ - star_rating_number_config: Number Config
8
+ - star_rating_size_options: Size Options
6
9
 
7
10
  react:
8
- - star_rating_default: Default
9
- - star_rating_hide: Hide Rating Value
11
+ - star_rating_default: Default
12
+ - star_rating_color_options: Color Options
13
+ - star_rating_background_options: Background Options
14
+ - star_rating_hide: Layout Options
15
+ - star_rating_number_config: Number Config
16
+ - star_rating_size_options: Size Options
@@ -1,3 +1,11 @@
1
1
  export { default as StarRatingDefault } from './_star_rating_default.jsx'
2
2
 
3
+ export { default as StarRatingColorOptions } from './_star_rating_color_options.jsx'
4
+
5
+ export { default as StarRatingBackgroundOptions } from './_star_rating_background_options.jsx'
6
+
3
7
  export { default as StarRatingHide } from './_star_rating_hide.jsx'
8
+
9
+ export { default as StarRatingNumberConfig } from './_star_rating_number_config.jsx'
10
+
11
+ export { default as StarRatingSizeOptions } from './_star_rating_size_options.jsx'
@@ -1,31 +1,53 @@
1
1
  <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname) do %>
5
- <%# Rating value %>
6
- <% if !object.hide_rating %>
7
- <%= content_tag(:div, object.rating, class: "pb_star_rating_number") %>
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname) do %>
5
+ <% if layout_option == "number" %>
6
+ <% case object.size %>
7
+ <% when "xs", "sm" %>
8
+ <%= pb_rails("caption", props: { text: object.rating,
9
+ size: "sm",
10
+ classname: "pb_star_rating_number_#{size}",
11
+ dark: dark,
12
+ padding_right: "xxs" }) %>
13
+ <% when "md" %>
14
+ <%= pb_rails("body", props: { text: object.rating,
15
+ dark: dark,
16
+ classname: "pb_star_rating_number_#{size}",
17
+ padding_right: "xxs" }) %>
18
+ <% when "lg" %>
19
+ <%= pb_rails("title", props: { text: object.rating,
20
+ size: 2,
21
+ dark: dark,
22
+ classname: "pb_star_rating_number_#{size}",
23
+ padding_right: "sm" }) %>
8
24
  <% end %>
9
-
10
- <%= content_tag(:div, class: "pb_star_rating_wrapper") do %>
11
- <%# Gold stars generated by rating value %>
12
- <%= content_tag(:div, class: "pb_star_rating_highlight") do %>
13
- <% object.star_count.times do %>
14
- <%= pb_rails("icon", props: { icon: "star" }) %>
15
- <% end %>
16
- <% unless object.star_full %>
17
- <%= pb_rails("icon", props: { icon: "star-half" }) %>
18
- <% end %>
19
- <% end %>
20
-
21
- <%# Grey background stars as base %>
22
- <%= content_tag(:div, class: "pb_star_rating_base") do %>
23
- <%= pb_rails("icon", props: { icon: "star" }) %>
24
- <%= pb_rails("icon", props: { icon: "star" }) %>
25
- <%= pb_rails("icon", props: { icon: "star" }) %>
26
- <%= pb_rails("icon", props: { icon: "star" }) %>
27
- <%= pb_rails("icon", props: { icon: "star" }) %>
25
+ <% end %>
26
+ <%= pb_rails("flex", props: { }) do %>
27
+ <% object.star_count.times do %>
28
+ <%= pb_rails("icon", props: { classname: "#{star_color} pb_star_#{size}" , custom_icon: Playbook::Engine.root.join(star_svg_path) } ) %>
29
+ <% end %>
30
+ <% object.empty_stars.times do %>
31
+ <%= pb_rails("icon", props: { classname: "#{background_star_color} pb_star_#{size}", custom_icon: Playbook::Engine.root.join(background_star_path) } ) %>
32
+ <% end %>
33
+ <% end %>
34
+ <% if layout_option == "onestar" %>
35
+ <%= content_tag(:div, class: "pb_star_rating_number_#{size}") do %>
36
+ <% case object.size %>
37
+ <% when "xs", "sm" %>
38
+ <%= pb_rails("caption", props: { text: "#{object.rating} of #{object.denominator}",
39
+ size: "sm",
40
+ dark: dark,
41
+ padding_left: "xxs" }) %>
42
+ <% when "md" %>
43
+ <%= pb_rails("body", props: { text: "#{object.rating} of #{object.denominator}",
44
+ dark: dark,
45
+ padding_left: "xxs" }) %>
46
+ <% when "lg" %>
47
+ <%= pb_rails("title", props: { text: "#{object.rating} of #{object.denominator}",
48
+ size: 2,
49
+ dark: dark }) %>
28
50
  <% end %>
29
-
30
51
  <% end %>
52
+ <% end %>
31
53
  <% end %>
@@ -3,18 +3,94 @@
3
3
  module Playbook
4
4
  module PbStarRating
5
5
  class StarRating < Playbook::KitBase
6
- prop :hide_rating, type: Playbook::Props::Boolean,
7
- default: false
8
-
9
6
  prop :rating, type: Playbook::Props::Numeric,
10
7
  default: 0
11
8
 
9
+ prop :denominator, type: Playbook::Props::Numeric,
10
+ default: 5
11
+
12
+ prop :layout_option, type: Playbook::Props::Enum,
13
+ values: %w[default onestar number],
14
+ default: "default"
15
+
16
+ prop :color_option, type: Playbook::Props::Enum,
17
+ values: %w[yellow primary subtle],
18
+ default: "yellow"
19
+
20
+ prop :size, type: Playbook::Props::Enum,
21
+ values: %w[xs sm md lg],
22
+ default: "sm"
23
+
24
+ prop :background_type, type: Playbook::Props::Enum,
25
+ values: %w[fill outline],
26
+ default: "fill"
27
+
12
28
  def star_count
13
- rating.floor
29
+ rating.floor > denominator_style ? denominator_style : rating.floor
30
+ end
31
+
32
+ def denominator_style
33
+ layout_option == "onestar" ? 1 : denominator
34
+ end
35
+
36
+ def empty_stars
37
+ (denominator_style - rating.floor).negative? ? 0 : denominator_style - rating.floor
38
+ end
39
+
40
+ def star_color
41
+ case color_option
42
+ when "yellow"
43
+ "yellow_star"
44
+ when "primary"
45
+ "primary_star"
46
+ when "subtle"
47
+ dark ? "suble_star_dark" : "suble_star_light"
48
+ end
49
+ end
50
+
51
+ def background_star_color
52
+ if background_type === "outline"
53
+ dark ? "outline_empty_star_dark" : "outline_empty_star_light"
54
+ else
55
+ dark ? "empty_star_dark" : "empty_star_light"
56
+ end
57
+ end
58
+
59
+ def svg_size
60
+ sizes = { "xs": "pb_star_xs",
61
+ "sm": "pb_star_sm",
62
+ "md": "pb_star_md",
63
+ "lg": "pb_star_lg" }
64
+ sizes[size.to_sym]
65
+ end
66
+
67
+ def svg_class
68
+ "pb_star_#{size}"
69
+ end
70
+
71
+ def background_star_path
72
+ if background_type === "outline"
73
+ "app/pb_kits/playbook/pb_star_rating/stars/star_outline.svg"
74
+ else
75
+ "app/pb_kits/playbook/pb_star_rating/stars/yellow_star.svg"
76
+ end
14
77
  end
15
78
 
16
- def star_full
17
- (rating.to_f % 1).zero?
79
+ def star_svg_path
80
+ case color_option
81
+ when "yellow"
82
+ "app/pb_kits/playbook/pb_star_rating/stars/yellow_star.svg"
83
+ when "primary"
84
+ "app/pb_kits/playbook/pb_star_rating/stars/primary_star.svg"
85
+ when "subtle"
86
+ if dark == true
87
+ "app/pb_kits/playbook/pb_star_rating/stars/subtle_dark_star.svg"
88
+ else
89
+ "app/pb_kits/playbook/pb_star_rating/stars/subtle_star.svg"
90
+ end
91
+ else
92
+ "app/pb_kits/playbook/pb_star_rating/stars/primary_star.svg"
93
+ end
18
94
  end
19
95
 
20
96
  def classname
@@ -1,24 +1,22 @@
1
- import React from "react";
2
- import { render, screen } from "../utilities/test-utils";
1
+ import React from "react"
2
+ import { render, screen } from "../utilities/test-utils"
3
3
 
4
- import StarRating from "./_star_rating";
4
+ import StarRating from "./_star_rating"
5
5
 
6
- const testId = "star-rating-kit";
6
+ const testId = "star-rating-kit"
7
7
 
8
8
  describe("Star Rating Kit", () => {
9
9
  test("Expects to have correct classname", () => {
10
10
  render(
11
11
  <StarRating
12
12
  data={{ testid: testId }}
13
- rating={2}
14
13
  />
15
- );
16
-
14
+ )
17
15
 
18
- const kit = screen.getByTestId(testId);
19
- expect(kit).toHaveClass("pb_star_rating_kit");
16
+ const kit = screen.getByTestId(testId)
17
+ expect(kit.className).toBe("pb_star_rating_kit")
20
18
 
21
- });
19
+ })
22
20
 
23
21
  test('should render aria-label', () => {
24
22
  render(
@@ -27,45 +25,47 @@ describe("Star Rating Kit", () => {
27
25
  data={{ testid: testId }}
28
26
  rating={2}
29
27
  />
30
- );
28
+ )
31
29
 
32
30
  const kit = screen.getByTestId(testId)
33
31
  expect(kit).toHaveAttribute('aria-label', testId)
34
- });
32
+ })
35
33
 
36
- test("Displays two highlighted stars", () => {
34
+ test("Displays correct denominator", () => {
37
35
  render(
38
36
  <StarRating
39
37
  data={{ testid: testId }}
38
+ denominator={4}
40
39
  rating={2}
40
+ size="xs"
41
41
  />
42
- );
43
-
42
+ )
44
43
 
45
- const kit = screen.getByTestId(testId);
46
- const highlight = kit.querySelector(".pb_star_rating_highlight");
47
- const stars = highlight.querySelectorAll(".far.fa-star");
48
- const count = stars.length;
44
+ const kit = screen.getByTestId(testId)
45
+ const highlight = kit.querySelector(".star_flex_area")
46
+ const stars = highlight.querySelectorAll(".pb_star_xs")
47
+ const count = stars.length
49
48
 
50
- expect(count).toBe(2);
51
- });
49
+ expect(count).toBe(4)
50
+ })
52
51
 
53
- test("Displays three highlighted stars and a half star", () => {
52
+ test("Uses correct size", () => {
54
53
  render(
55
54
  <StarRating
56
55
  data={{ testid: testId }}
57
- rating={3.5}
56
+ layoutOption="number"
57
+ rating={2}
58
+ size="lg"
58
59
  />
59
- );
60
+ )
60
61
 
61
- const kit = screen.getByTestId(testId);
62
- const highlight = kit.querySelector(".pb_star_rating_highlight");
63
- const stars = highlight.querySelectorAll(".far.fa-star");
64
- const halfStars = highlight.querySelectorAll(".far.fa-star-half");
65
- const starCount = stars.length;
66
- const halfStarCount = halfStars.length;
62
+ const kit = screen.getByTestId(testId)
63
+ const highlight = kit.querySelector(".star_flex_area")
64
+ const title = kit.querySelector(".pb_star_rating_number_lg")
65
+ const stars = highlight.querySelectorAll(".pb_star_lg")
66
+ const count = stars.length
67
67
 
68
- expect(starCount).toBe(3);
69
- expect(halfStarCount).toBe(1);
70
- });
71
- });
68
+ expect(title.className).toBe("pb_title_kit_size_2 pr_sm pb_star_rating_number_lg")
69
+ expect(count).toBe(5)
70
+ })
71
+ })
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fillRule="evenodd" clipRule="evenodd" d="M9.86015 0.4371C9.73527 0.187329 9.4855 0 9.17328 0C8.89229 0 8.64252 0.187329 8.51763 0.4371L6.36335 4.83932L1.58647 5.55742C1.30547 5.58864 1.08692 5.80719 0.99326 6.05696C0.899595 6.33795 0.962038 6.61895 1.18059 6.8375L4.64617 10.2719L3.80319 15.1112C3.77197 15.3922 3.89685 15.7044 4.11541 15.8605C4.36518 16.0166 4.64617 16.0478 4.89594 15.9229L9.17328 13.6126L13.4506 15.9229C13.7004 16.0478 14.0126 16.0166 14.2624 15.8605C14.4809 15.7044 14.6058 15.3922 14.5434 15.1112L13.7316 10.2719L17.1972 6.8375C17.4157 6.61895 17.4782 6.33795 17.3845 6.05696C17.2909 5.80719 17.0723 5.58864 16.7913 5.55742L12.0144 4.83932L9.86015 0.4371Z" fill="#0056CF"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M5.91323 5.33377L6.17269 5.29477L6.28801 5.0591L8.44116 0.659187C8.49971 0.543364 8.59517 0.5 8.64884 0.5C8.74499 0.5 8.83506 0.555009 8.88775 0.659235L11.0409 5.0591L11.1562 5.29477L11.4157 5.33377L16.1925 6.05186L16.2021 6.0533L16.2117 6.05436C16.2359 6.05706 16.2671 6.06847 16.3024 6.09973C16.3374 6.13062 16.3686 6.17476 16.3886 6.22412C16.4186 6.32162 16.401 6.40181 16.3198 6.48332C16.3196 6.48353 16.3194 6.48374 16.3192 6.48395L12.8552 9.91671L12.6712 10.0991L12.7141 10.3546L13.5258 15.1939L13.528 15.2068L13.5308 15.2196C13.5488 15.3004 13.5074 15.402 13.4567 15.4462C13.3391 15.5132 13.2227 15.5096 13.1546 15.4781L8.88646 13.1726L8.64884 13.0443L8.41121 13.1726L4.14274 15.4782C4.07877 15.5083 3.99031 15.5147 3.87267 15.4466C3.82302 15.4033 3.76655 15.2914 3.77463 15.1781L4.61431 10.3577L4.65911 10.1005L4.47368 9.91671L1.0097 6.48394C1.00947 6.48372 1.00925 6.4835 1.00903 6.48327C0.927878 6.40178 0.91031 6.3216 0.94026 6.22412C0.960274 6.17476 0.99154 6.13062 1.02646 6.09973C1.0618 6.06847 1.09296 6.05706 1.11724 6.05436L1.12682 6.0533L1.13635 6.05186L5.91323 5.33377Z" stroke="#C1CDD6"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path class="" fillRule="evenodd" clipRule="evenodd" d="M9.86015 0.4371C9.73527 0.187329 9.4855 0 9.17328 0C8.89229 0 8.64252 0.187329 8.51763 0.4371L6.36335 4.83932L1.58647 5.55742C1.30547 5.58864 1.08692 5.80719 0.99326 6.05696C0.899595 6.33795 0.962038 6.61895 1.18059 6.8375L4.64617 10.2719L3.80319 15.1112C3.77197 15.3922 3.89685 15.7044 4.11541 15.8605C4.36518 16.0166 4.64617 16.0478 4.89594 15.9229L9.17328 13.6126L13.4506 15.9229C13.7004 16.0478 14.0126 16.0166 14.2624 15.8605C14.4809 15.7044 14.6058 15.3922 14.5434 15.1112L13.7316 10.2719L17.1972 6.8375C17.4157 6.61895 17.4782 6.33795 17.3845 6.05696C17.2909 5.80719 17.0723 5.58864 16.7913 5.55742L12.0144 4.83932L9.86015 0.4371Z" fill="#F9BB00"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fillRule="evenodd" clipRule="evenodd" d="M9.86015 0.4371C9.73527 0.187329 9.4855 0 9.17328 0C8.89229 0 8.64252 0.187329 8.51763 0.4371L6.36335 4.83932L1.58647 5.55742C1.30547 5.58864 1.08692 5.80719 0.99326 6.05696C0.899595 6.33795 0.962038 6.61895 1.18059 6.8375L4.64617 10.2719L3.80319 15.1112C3.77197 15.3922 3.89685 15.7044 4.11541 15.8605C4.36518 16.0166 4.64617 16.0478 4.89594 15.9229L9.17328 13.6126L13.4506 15.9229C13.7004 16.0478 14.0126 16.0166 14.2624 15.8605C14.4809 15.7044 14.6058 15.3922 14.5434 15.1112L13.7316 10.2719L17.1972 6.8375C17.4157 6.61895 17.4782 6.33795 17.3845 6.05696C17.2909 5.80719 17.0723 5.58864 16.7913 5.55742L12.0144 4.83932L9.86015 0.4371Z" fill="#F9BB00"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fillRule="evenodd" clipRule="evenodd" d="M9.86015 0.4371C9.73527 0.187329 9.4855 0 9.17328 0C8.89229 0 8.64252 0.187329 8.51763 0.4371L6.36335 4.83932L1.58647 5.55742C1.30547 5.58864 1.08692 5.80719 0.99326 6.05696C0.899595 6.33795 0.962038 6.61895 1.18059 6.8375L4.64617 10.2719L3.80319 15.1112C3.77197 15.3922 3.89685 15.7044 4.11541 15.8605C4.36518 16.0166 4.64617 16.0478 4.89594 15.9229L9.17328 13.6126L13.4506 15.9229C13.7004 16.0478 14.0126 16.0166 14.2624 15.8605C14.4809 15.7044 14.6058 15.3922 14.5434 15.1112L13.7316 10.2719L17.1972 6.8375C17.4157 6.61895 17.4782 6.33795 17.3845 6.05696C17.2909 5.80719 17.0723 5.58864 16.7913 5.55742L12.0144 4.83932L9.86015 0.4371Z" />
3
+ </svg>
@@ -70,8 +70,8 @@ const TypeaheadWithHighlight = (props) => {
70
70
  }
71
71
 
72
72
  const customComponents = {
73
- Option: (props: OptionProps) => (
74
- <components.Option {...props}/>
73
+ Option: (highlightProps: OptionProps) => (
74
+ <components.Option {...highlightProps}/>
75
75
  ),
76
76
  SingleValue: ({ data }: any) => (
77
77
  <span>{data.name}</span>