playbook_ui_docs 13.12.0.pre.alpha.PLAY1093typeaheadkitdocbug1577 → 13.12.0.pre.alpha.play900startratingasinput1543

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: 6b9091b19ca89f4b89bd972b985638b62565e9839a5571ca991980337a79b384
4
- data.tar.gz: 1cad160b7ed401c31309a6c256b424dae4360dc6a69fb041332a0daab4ab6d2b
3
+ metadata.gz: 77131501c04ac2402728df23ba92af94d58139990266570ff4ca94fd61aa5214
4
+ data.tar.gz: c5bd73491456eccbc07a418dfe42e8c4d734e61736f902560d9cdb695d260d8b
5
5
  SHA512:
6
- metadata.gz: d69a131f9f79cb341ecc7e2c4a29cc818ea5c5992745f999dabce955c7f53a2f4419c8f2506df1f9a895a3817f312f145eb4a57e24fc78e96390f686282442c0
7
- data.tar.gz: 60b7a49a8d734ca464c7e6800dc07c7357009674c18bf7bc100bd0fa971cdfd1153d2025bf00b00da6cb2ed535a5261b633e3fdeb4b130d43e207e564f93b554
6
+ metadata.gz: ce0c3631dd26bc41245ddc5a04977f8639ba80adc75aa11fabfe9d7265dead052a7a73612fdd77f33e6b41fee2f419f05dd5e89c77e887a70edef585d6b8c724
7
+ data.tar.gz: 561affdbf3b243309d0c93b4f272f25f7cb6d22a65dff1c386ccdd0f25b6bbcec9864d8306bb9c4fe72b72e2e8fdeb71547f44e4fc97877fd65615405e931a31
@@ -0,0 +1,7 @@
1
+ <%= pb_rails("star_rating", props: { rating: 3 }) %>
2
+ </br>
3
+ <%= pb_rails("star_rating", props: { rating: 3, color_option: "outline" }) %>
4
+ </br>
5
+ <%= pb_rails("star_rating", props: { rating: 3, color_option: "primary" }) %>
6
+ </br>
7
+ <%= pb_rails("star_rating", props: { rating: 3, color_option: "subtle" }) %>
@@ -0,0 +1,40 @@
1
+ import React from 'react'
2
+
3
+ import StarRating from '../_star_rating'
4
+
5
+ const StarRatingColorOptions = (props) => (
6
+ <>
7
+
8
+ <StarRating
9
+ rating={3}
10
+ {...props}
11
+ />
12
+
13
+ <br />
14
+
15
+ <StarRating
16
+ colorOption='outline'
17
+ rating={3}
18
+ {...props}
19
+ />
20
+
21
+ <br />
22
+
23
+ <StarRating
24
+ colorOption='primary'
25
+ rating={3}
26
+ {...props}
27
+ />
28
+
29
+ <br />
30
+
31
+ <StarRating
32
+ colorOption='subtle'
33
+ rating={3}
34
+ {...props}
35
+ />
36
+
37
+ </>
38
+ )
39
+
40
+ export default StarRatingColorOptions
@@ -2,12 +2,22 @@
2
2
 
3
3
  <br>
4
4
 
5
+ <%= pb_rails("star_rating", props: { rating: 1 }) %>
6
+
7
+ <br>
8
+
9
+ <%= pb_rails("star_rating", props: { rating: 2}) %>
10
+
11
+ <br>
12
+
5
13
  <%= pb_rails("star_rating", props: { rating: 3 }) %>
6
14
 
7
15
  <br>
8
16
 
9
- <%= pb_rails("star_rating", props: { rating: 1.5 }) %>
17
+ <%= pb_rails("star_rating", props: { rating: 4 }) %>
10
18
 
11
19
  <br>
12
20
 
13
21
  <%= pb_rails("star_rating", props: { rating: 5 }) %>
22
+
23
+ <br>
@@ -4,12 +4,12 @@ import StarRating from '../_star_rating'
4
4
 
5
5
  const StarRatingDefault = (props) => (
6
6
  <>
7
- <StarRating />
7
+ <StarRating {...props} />
8
8
 
9
9
  <br />
10
10
 
11
11
  <StarRating
12
- rating={3}
12
+ rating={0.9}
13
13
  {...props}
14
14
  />
15
15
 
@@ -20,6 +20,21 @@ const StarRatingDefault = (props) => (
20
20
  {...props}
21
21
  />
22
22
 
23
+ <br />
24
+
25
+ <StarRating
26
+ rating={3}
27
+ {...props}
28
+ />
29
+
30
+ <br />
31
+
32
+ <StarRating
33
+ rating={4.2}
34
+ {...props}
35
+ />
36
+
37
+
23
38
  <br />
24
39
 
25
40
  <StarRating
@@ -1 +1,6 @@
1
- <%= pb_rails("star_rating", props: { rating: 3.5, hide_rating: true }) %>
1
+ <%= pb_rails("star_rating", props: { rating: 3 }) %>
2
+ </br>
3
+ <%= pb_rails("star_rating", props: { rating: 3, layout_option: "number" }) %>
4
+ </br>
5
+ <%= pb_rails("star_rating", props: { rating: 3, layout_option: "onestar" }) %>
6
+ </br>
@@ -3,13 +3,30 @@ import React from 'react'
3
3
  import StarRating from '../_star_rating'
4
4
 
5
5
  const StarRatingHide = (props) => (
6
+ <>
6
7
 
7
- <StarRating
8
- hideRating
9
- rating={3.5}
10
- {...props}
11
- />
8
+ <StarRating
9
+ rating={3}
10
+ {...props}
11
+ />
12
12
 
13
+ <br />
14
+
15
+ <StarRating
16
+ layoutOption={"number"}
17
+ rating={3}
18
+ {...props}
19
+ />
20
+
21
+ <br />
22
+
23
+ <StarRating
24
+ layoutOption={"onestar"}
25
+ rating={3}
26
+ {...props}
27
+ />
28
+
29
+ </>
13
30
  )
14
31
 
15
32
  export default StarRatingHide
@@ -0,0 +1,12 @@
1
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 3 }) %>
2
+ </br>
3
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 4 }) %>
4
+ </br>
5
+ <%= pb_rails("star_rating", props: { rating: 3 }) %>
6
+ </br>
7
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 6 }) %>
8
+ </br>
9
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 7 }) %>
10
+ </br>
11
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 8 }) %>
12
+ </br>
@@ -0,0 +1,57 @@
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
+ rating={3}
11
+ {...props}
12
+ />
13
+
14
+ <br />
15
+
16
+ <StarRating
17
+ denominator={4}
18
+ rating={3}
19
+ {...props}
20
+ />
21
+
22
+ <br />
23
+
24
+ <StarRating
25
+ denominator={5}
26
+ rating={3}
27
+ {...props}
28
+ />
29
+
30
+ <br />
31
+
32
+ <StarRating
33
+ denominator={6}
34
+ rating={3}
35
+ {...props}
36
+ />
37
+
38
+ <br />
39
+
40
+ <StarRating
41
+ denominator={7}
42
+ rating={3}
43
+ {...props}
44
+ />
45
+
46
+ <br />
47
+
48
+ <StarRating
49
+ denominator={8}
50
+ rating={3}
51
+ {...props}
52
+ />
53
+
54
+ </>
55
+ )
56
+
57
+ export default StarRatingNumberConfig
@@ -0,0 +1,23 @@
1
+ <%= pb_rails("star_rating", props: { rating: 3, size: "xs" }) %>
2
+
3
+ <br>
4
+
5
+ <%= pb_rails("star_rating", props: { rating: 3, size: "sm" }) %>
6
+
7
+ <br>
8
+
9
+ <%= pb_rails("star_rating", props: { rating: 3, size: "md" }) %>
10
+
11
+ <br>
12
+
13
+ <%= pb_rails("star_rating", props: { rating: 3, size: "lg" }) %>
14
+
15
+ <br>
16
+
17
+ <%= pb_rails("star_rating", props: { rating: 3, size: "lg", layout_option: "number" }) %>
18
+
19
+ <br>
20
+
21
+ <%= pb_rails("star_rating", props: { rating: 3, size: "lg", layout_option: "onestar" }) %>
22
+
23
+ <br>
@@ -0,0 +1,59 @@
1
+ import React from 'react'
2
+
3
+ import StarRating from '../_star_rating'
4
+
5
+ const StarRatingSizeOptions = (props) => (
6
+ <>
7
+
8
+ <StarRating
9
+ rating={3}
10
+ size="xs"
11
+ {...props}
12
+ />
13
+
14
+ <br />
15
+
16
+ <StarRating
17
+ rating={3}
18
+ size="sm"
19
+ {...props}
20
+ />
21
+
22
+ <br />
23
+
24
+ <StarRating
25
+ rating={3}
26
+ size="md"
27
+ {...props}
28
+ />
29
+
30
+ <br />
31
+
32
+ <StarRating
33
+ rating={3}
34
+ size="lg"
35
+ {...props}
36
+ />
37
+
38
+ <br />
39
+
40
+ <StarRating
41
+ layoutOption="number"
42
+ rating={3}
43
+ size="lg"
44
+ {...props}
45
+ />
46
+
47
+ <br />
48
+
49
+ <StarRating
50
+ layoutOption="onestar"
51
+ rating={3}
52
+ size="lg"
53
+ {...props}
54
+ />
55
+
56
+ </>
57
+ )
58
+
59
+ export default StarRatingSizeOptions
@@ -1,9 +1,14 @@
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_hide: Layout Options
6
+ - star_rating_number_config: Number Config
7
+ - star_rating_size_options: Size Options
6
8
 
7
9
  react:
8
- - star_rating_default: Default
9
- - star_rating_hide: Hide Rating Value
10
+ - star_rating_default: Default
11
+ - star_rating_color_options: Color Options
12
+ - star_rating_hide: Layout Options
13
+ - star_rating_number_config: Number Config
14
+ - star_rating_size_options: Size Options
@@ -1,3 +1,9 @@
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
+
3
5
  export { default as StarRatingHide } from './_star_rating_hide.jsx'
6
+
7
+ export { default as StarRatingNumberConfig } from './_star_rating_number_config.jsx'
8
+
9
+ export { default as StarRatingSizeOptions } from './_star_rating_size_options.jsx'
@@ -70,8 +70,8 @@ const TypeaheadWithHighlight = (props) => {
70
70
  }
71
71
 
72
72
  const customComponents = {
73
- Option: (highlightProps: OptionProps) => (
74
- <components.Option {...highlightProps}/>
73
+ Option: (props: OptionProps) => (
74
+ <components.Option {...props}/>
75
75
  ),
76
76
  SingleValue: ({ data }: any) => (
77
77
  <span>{data.name}</span>