playbook_ui_docs 13.13.0.pre.alpha.play10821727 → 13.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +4 -5
  3. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.html.erb +29 -0
  4. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.jsx +34 -0
  5. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.md +7 -0
  6. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.html.erb +28 -0
  7. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.jsx +34 -0
  8. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.md +1 -0
  9. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_react.jsx +2 -2
  10. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +4 -0
  11. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -0
  12. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height.jsx +4 -8
  13. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.jsx +4 -8
  14. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx +2 -4
  15. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +1 -1
  16. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.html.erb +2 -0
  17. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.jsx +25 -0
  18. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.html.erb +3 -0
  19. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.jsx +31 -0
  20. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.html.erb +6 -8
  21. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx +19 -6
  22. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.html.erb +4 -1
  23. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.jsx +30 -5
  24. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.html.erb +6 -0
  25. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.jsx +58 -0
  26. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.html.erb +16 -0
  27. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.jsx +60 -0
  28. data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +12 -5
  29. data/app/pb_kits/playbook/pb_star_rating/docs/index.js +8 -0
  30. data/dist/playbook-doc.js +8 -8
  31. metadata +21 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35c56e2a4b3b6299db72d06c655394f738ee06b8819686170e7b1003821dc7b5
4
- data.tar.gz: 685c6d4b6e6edcff3638e10a75299c4de46d2bbdecb23fba4ddb523b4b2bd8fc
3
+ metadata.gz: ae66a431cc3ef3ddddbd1d0479c92ea5996e44026af6aacf0c3d18865b2b42fe
4
+ data.tar.gz: 899040ce814bb100a8d516608d0c2b84f6aea8d9fd255fb9bee50f9efc13ab12
5
5
  SHA512:
6
- metadata.gz: 77597fa100e9b095f7a928d9c68bd41fbb60b00f093918f3377469aa810b56e51cabb94b43574f5cb2e0e52540a2564e95b8b57649a4227eb5465f1bb45ac91d
7
- data.tar.gz: da6c4be237f832a65ae6f14ee59c82cfb403e41d83595ed4ba135980ad03b6b7c8918c46e93f4b8c0efa4370c579d3b4040211c56c548f8acb43875995f22072
6
+ metadata.gz: b04fbded230599366f60305a9af71d4deaee0b6980b0d1c35707e63fb9329290911726c0602e161afba16260e43592a568aafb9cc57e87d913ab87edf879c91c
7
+ data.tar.gz: 6098eded31a46ffe0d185a0417c9b4db65a9eed2c6055302e19669d9afd8d52e536261c9722d4e764f6cfaf0b9bad05e6da34fe439125f213ceb36ad791bd38d
@@ -57,7 +57,7 @@ const CardBackground = (props) => {
57
57
  background="product_1_background"
58
58
  marginBottom="sm"
59
59
  {...props}
60
- >
60
+ >
61
61
  <Body
62
62
  dark
63
63
  text="Product 1 Background"
@@ -69,12 +69,11 @@ const CardBackground = (props) => {
69
69
  <Card
70
70
  background="product_7_highlight"
71
71
  marginBottom="sm"
72
- {...props}
73
- >
72
+ {...props} >
74
73
  <Body
75
74
  dark
76
- text="Product 7 Highlight"
77
- />
75
+ text="Product 7 Highlight"
76
+ />
78
77
  </Card>
79
78
 
80
79
 
@@ -0,0 +1,29 @@
1
+ <%= pb_rails("date_picker", props: {
2
+ allow_input: true,
3
+ custom_quick_pick_dates: {
4
+ dates: [
5
+ # Allow Playbook to handle the logic...
6
+ {
7
+ label: "Last 15 months",
8
+ value: {
9
+ timePeriod: "months",
10
+ amount: 15,
11
+ },
12
+ },
13
+ # Or, be explicit with an exact date range for more control...
14
+ {
15
+ label: "First Week of June 2022",
16
+ value: ["06/01/2022", "06/07/2022"],
17
+ },
18
+ ],
19
+ },
20
+ end_date_id: "quick-pick-end-date",
21
+ end_date_name: "quick-pick-end-date",
22
+ mode: "range",
23
+ picker_id: "date-picker-quick-pick-custom",
24
+ placeholder: "mm/dd/yyyy to mm/dd/yyyy",
25
+ selection_type: "quickpick",
26
+ start_date_id: "quick-pick-start-date",
27
+ start_date_name: "quick-pick-start-date"
28
+ }) %>
29
+
@@ -0,0 +1,34 @@
1
+ import React from "react"
2
+ import DatePicker from "../_date_picker"
3
+
4
+ const DatePickerQuickPickCustom = (props) => (
5
+ <>
6
+ <DatePicker
7
+ allowInput
8
+ customQuickPickDates={{
9
+ dates: [
10
+ // Allow Playbook to handle the logic...
11
+ {
12
+ label: "Last 15 months",
13
+ value: {
14
+ timePeriod: "months",
15
+ amount: 15,
16
+ },
17
+ },
18
+ // Or, be explicit with an exact date range for more control...
19
+ {
20
+ label: "First Week of June 2022",
21
+ value: ["06/01/2022", "06/07/2022"],
22
+ },
23
+ ],
24
+ }}
25
+ mode='range'
26
+ pickerId='date-picker-quick-pick-custom-override'
27
+ placeholder='mm/dd/yyyy to mm/dd/yyyy'
28
+ selectionType='quickpick'
29
+ {...props}
30
+ />
31
+ </>
32
+ )
33
+
34
+ export default DatePickerQuickPickCustom
@@ -0,0 +1,7 @@
1
+ The customQuickPickDates/custom_quick_pick_dates prop allows for the user/dev to define their own quick pick dates.
2
+ The prop accepts an object with two key/value pairs: dates & override (separate doc example below).
3
+
4
+ The dates property accepts an array of objects. Each object in the array has label and value properties. The label is what will be displayed in the UI of the dropdown menu. The value property is just the date that is going to be passed to the datepicker. The value property can be an array of two strings that represent a range, allowing for the dev to be extremely specific. Additionally, the dates array allows for a clean, simple API under that automatically converts dates in a common vernacular.
5
+
6
+ The timePeriod property accepts "days", "weeks", "months", "quarters" or "years", representing past time periods.
7
+ The amount property accepts any number.
@@ -0,0 +1,28 @@
1
+ <%= pb_rails("date_picker", props: {
2
+ allow_input: true,
3
+ custom_quick_pick_dates: {
4
+ override: false,
5
+ dates: [
6
+ {
7
+ label: "Last 15 months",
8
+ value: {
9
+ timePeriod: "months",
10
+ amount: 15,
11
+ },
12
+ },
13
+ {
14
+ label: "First Week of June 2022",
15
+ value: ["06/01/2022", "06/07/2022"],
16
+ },
17
+ ],
18
+ },
19
+ end_date_id: "quick-pick-end-date",
20
+ end_date_name: "quick-pick-end-date",
21
+ mode: "range",
22
+ picker_id: "date-picker-quick-pick-override",
23
+ placeholder: "mm/dd/yyyy to mm/dd/yyyy",
24
+ selection_type: "quickpick",
25
+ start_date_id: "quick-pick-start-date",
26
+ start_date_name: "quick-pick-start-date"
27
+ }) %>
28
+
@@ -0,0 +1,34 @@
1
+ import React from "react"
2
+ import DatePicker from "../_date_picker"
3
+
4
+ const DatePickerQuickPickCustomOverride = (props) => (
5
+ <>
6
+ <DatePicker
7
+ allowInput
8
+ customQuickPickDates={{
9
+ override: false,
10
+ dates: [
11
+ {
12
+ label: "Last 15 months",
13
+ value: {
14
+ timePeriod: "months",
15
+ amount: 15,
16
+ },
17
+ },
18
+ {
19
+ label: "First Week of June 2022",
20
+ value: ["06/01/2022", "06/07/2022"],
21
+ },
22
+ ],
23
+ }}
24
+ marginTop='lg'
25
+ mode='range'
26
+ pickerId='date-picker-quick-pick-custom'
27
+ placeholder='mm/dd/yyyy to mm/dd/yyyy'
28
+ selectionType='quickpick'
29
+ {...props}
30
+ />
31
+ </>
32
+ )
33
+
34
+ export default DatePickerQuickPickCustomOverride
@@ -0,0 +1 @@
1
+ The customQuickPickDates/custom_quick_pick_dates prop allows for an override boolean. The override allows for the user to completely override the quick pick dates that ship with the component. Default of `override` is set to true. If you would like to simply append your dates to the default quick pick dates, set this prop to false explicitly.
@@ -1,5 +1,5 @@
1
- import React from 'react'
2
- import DatePicker from '../_date_picker'
1
+ import React from "react"
2
+ import DatePicker from "../_date_picker"
3
3
 
4
4
  const DatePickerQuickPickReact = (props) => (
5
5
  <>
@@ -10,6 +10,8 @@ examples:
10
10
  - date_picker_range: Range
11
11
  - date_picker_quick_pick_rails: Range (Quick Pick)
12
12
  - date_picker_quick_pick_range_limit: Range (Quick Pick w/ “This” Range limit)
13
+ - date_picker_quick_pick_custom: Custom Quick Pick Dates
14
+ - date_picker_quick_pick_custom_override: Custom Quick Pick Dates (append to defaults)
13
15
  - date_picker_format: Format
14
16
  - date_picker_disabled: Disabled Dates
15
17
  - date_picker_min_max: Min Max
@@ -37,6 +39,8 @@ examples:
37
39
  - date_picker_range: Range
38
40
  - date_picker_quick_pick_react: Range (Quick Pick)
39
41
  - date_picker_quick_pick_range_limit: Range (Quick Pick w/ “This” Range limit)
42
+ - date_picker_quick_pick_custom: Custom Quick Pick Dates
43
+ - date_picker_quick_pick_custom_override: Custom Quick Pick Dates (append to defaults)
40
44
  - date_picker_format: Format
41
45
  - date_picker_disabled: Disabled Dates
42
46
  - date_picker_min_max: Min Max
@@ -22,3 +22,5 @@ export { default as DatePickerAllowInput } from './_date_picker_allow_input'
22
22
  export { default as DatePickerQuickPickReact } from './_date_picker_quick_pick_react'
23
23
  export { default as DatePickerQuickPickRangeLimit } from './_date_picker_quick_pick_range_limit'
24
24
  export { default as DatePickerOnClose } from './_date_picker_on_close.jsx'
25
+ export { default as DatePickerQuickPickCustom } from './_date_picker_quick_pick_custom'
26
+ export { default as DatePickerQuickPickCustomOverride } from './_date_picker_quick_pick_custom_override'
@@ -49,18 +49,15 @@ const DialogFullHeight = () => {
49
49
  <Flex wrap>
50
50
  <Button id="sm"
51
51
  marginRight="md"
52
- onClick={toggleHeaderSeparatorDialog}
53
- >
52
+ onClick={toggleHeaderSeparatorDialog}>
54
53
  {"Small Dialog"}
55
54
  </Button>
56
55
  <Button marginRight="md"
57
- onClick={toggleFooterSeparatorDialog}
58
- >
56
+ onClick={toggleFooterSeparatorDialog}>
59
57
  {"Medium Dialog"}
60
58
  </Button>
61
59
  <Button marginRight="md"
62
- onClick={toggleBothSeparatorsDialog}
63
- >
60
+ onClick={toggleBothSeparatorsDialog}>
64
61
  {"Large Dialog"}
65
62
  </Button>
66
63
  </Flex>
@@ -92,8 +89,7 @@ const DialogFullHeight = () => {
92
89
  <Dialog.Footer>
93
90
  <Button onClick={toggle}>{"Send My Issue"}</Button>
94
91
  <Button onClick={toggle}
95
- variant="link"
96
- >
92
+ variant="link">
97
93
  {"Back"}
98
94
  </Button>
99
95
  </Dialog.Footer>
@@ -48,18 +48,15 @@ const DialogFullHeightPlacement = () => {
48
48
  <Flex wrap>
49
49
  <Button id="sm"
50
50
  marginRight="md"
51
- onClick={toggleHeaderSeparatorDialog}
52
- >
51
+ onClick={toggleHeaderSeparatorDialog}>
53
52
  {"Left Dialog"}
54
53
  </Button>
55
54
  <Button marginRight="xl"
56
- onClick={toggleFooterSeparatorDialog}
57
- >
55
+ onClick={toggleFooterSeparatorDialog}>
58
56
  {"Center Dialog"}
59
57
  </Button>
60
58
  <Button marginRight="xl"
61
- onClick={toggleBothSeparatorsDialog}
62
- >
59
+ onClick={toggleBothSeparatorsDialog}>
63
60
  {"Right Dialog"}
64
61
  </Button>
65
62
  </Flex>
@@ -91,8 +88,7 @@ const DialogFullHeightPlacement = () => {
91
88
  <Dialog.Footer>
92
89
  <Button onClick={toggle}>{"Send My Issue"}</Button>
93
90
  <Button onClick={toggle}
94
- variant="link"
95
- >
91
+ variant="link">
96
92
  {"Back"}
97
93
  </Button>
98
94
  </Dialog.Footer>
@@ -16,12 +16,10 @@ const DialogScrollable = () => {
16
16
  return (
17
17
  <>
18
18
  <Button marginRight="md"
19
- onClick={toggleDialog1}
20
- >{'Open Dialog'}
19
+ onClick={toggleDialog1}>{'Open Dialog'}
21
20
  </Button>
22
21
  <Button marginRight="md"
23
- onClick={toggleDialog2}
24
- >{'Open Full Height Dialog'}
22
+ onClick={toggleDialog2}>{'Open Full Height Dialog'}
25
23
  </Button>
26
24
  <Dialog
27
25
  cancelButton="Cancel"
@@ -84,7 +84,7 @@ const DialogStatus = () => {
84
84
  <Flex
85
85
  rowGap="xs"
86
86
  wrap
87
- >
87
+ >
88
88
  <Button
89
89
  marginRight="md"
90
90
  onClick={toggleDefaultAlert}
@@ -0,0 +1,2 @@
1
+ <%= pb_rails("star_rating", props: { rating: 3, background_type: "fill", padding_bottom: "xs" }) %>
2
+ <%= pb_rails("star_rating", props: { rating: 3, background_type: "outline", padding_bottom: "xs" }) %>
@@ -0,0 +1,25 @@
1
+ import React from 'react'
2
+
3
+ import StarRating from '../_star_rating'
4
+
5
+ const StarRatingBackgroundOptions = (props) => (
6
+ <>
7
+
8
+ <StarRating
9
+ paddingBottom="xs"
10
+ rating={3}
11
+ {...props}
12
+ />
13
+
14
+
15
+ <StarRating
16
+ backgroundType='outline'
17
+ paddingBottom="xs"
18
+ rating={3}
19
+ {...props}
20
+ />
21
+
22
+ </>
23
+ )
24
+
25
+ export default StarRatingBackgroundOptions
@@ -0,0 +1,3 @@
1
+ <%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
2
+ <%= pb_rails("star_rating", props: { rating: 3, color_option: "primary", padding_bottom: "xs" }) %>
3
+ <%= pb_rails("star_rating", props: { rating: 3, color_option: "subtle", padding_bottom: "xs" }) %>
@@ -0,0 +1,31 @@
1
+ import React from 'react'
2
+
3
+ import StarRating from '../_star_rating'
4
+
5
+ const StarRatingColorOptions = (props) => (
6
+ <>
7
+
8
+ <StarRating
9
+ paddingBottom="xs"
10
+ rating={3}
11
+ {...props}
12
+ />
13
+
14
+ <StarRating
15
+ colorOption='primary'
16
+ paddingBottom="xs"
17
+ rating={3}
18
+ {...props}
19
+ />
20
+
21
+ <StarRating
22
+ colorOption='subtle'
23
+ paddingBottom="xs"
24
+ rating={3}
25
+ {...props}
26
+ />
27
+
28
+ </>
29
+ )
30
+
31
+ export default StarRatingColorOptions
@@ -1,13 +1,11 @@
1
- <%= pb_rails("star_rating") %>
1
+ <%= pb_rails("star_rating", props: { padding_bottom: "xs" }) %>
2
2
 
3
- <br>
3
+ <%= pb_rails("star_rating", props: { rating: 0.9, padding_bottom: "xs" }) %>
4
4
 
5
- <%= pb_rails("star_rating", props: { rating: 3 }) %>
5
+ <%= pb_rails("star_rating", props: { rating: 1.5, padding_bottom: "xs" }) %>
6
6
 
7
- <br>
7
+ <%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
8
8
 
9
- <%= pb_rails("star_rating", props: { rating: 1.5 }) %>
9
+ <%= pb_rails("star_rating", props: { rating: 4.2, padding_bottom: "xs" }) %>
10
10
 
11
- <br>
12
-
13
- <%= pb_rails("star_rating", props: { rating: 5 }) %>
11
+ <%= pb_rails("star_rating", props: { rating: 5, padding_bottom: "xs" }) %>
@@ -4,25 +4,38 @@ import StarRating from '../_star_rating'
4
4
 
5
5
  const StarRatingDefault = (props) => (
6
6
  <>
7
- <StarRating />
7
+ <StarRating
8
+ paddingBottom="xs"
9
+ {...props}
10
+ />
8
11
 
9
- <br />
10
12
 
11
13
  <StarRating
12
- rating={3}
14
+ paddingBottom="xs"
15
+ rating={0.9}
13
16
  {...props}
14
17
  />
15
18
 
16
- <br />
17
-
18
19
  <StarRating
20
+ paddingBottom="xs"
19
21
  rating={1.5}
20
22
  {...props}
21
23
  />
22
24
 
23
- <br />
25
+ <StarRating
26
+ paddingBottom="xs"
27
+ rating={3}
28
+ {...props}
29
+ />
30
+
31
+ <StarRating
32
+ paddingBottom="xs"
33
+ rating={4.2}
34
+ {...props}
35
+ />
24
36
 
25
37
  <StarRating
38
+ paddingBottom="xs"
26
39
  rating={5}
27
40
  {...props}
28
41
  />
@@ -1 +1,4 @@
1
- <%= pb_rails("star_rating", props: { rating: 3.5, hide_rating: true }) %>
1
+ <%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
2
+ <%= pb_rails("star_rating", props: { rating: 2.8, layout_option: "number", padding_bottom: "xs" }) %>
3
+ <%= pb_rails("star_rating", props: { rating: 3, layout_option: "number", padding_bottom: "xs" }) %>
4
+ <%= pb_rails("star_rating", props: { rating: 1, layout_option: "onestar", padding_bottom: "xs" }) %>
@@ -3,13 +3,38 @@ 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
+ paddingBottom="xs"
10
+ rating={3}
11
+ {...props}
12
+ />
12
13
 
14
+
15
+ <StarRating
16
+ layoutOption={"number"}
17
+ paddingBottom="xs"
18
+ rating={2.8}
19
+ {...props}
20
+ />
21
+
22
+
23
+ <StarRating
24
+ layoutOption={"number"}
25
+ paddingBottom="xs"
26
+ rating={3}
27
+ {...props}
28
+ />
29
+
30
+ <StarRating
31
+ layoutOption={"onestar"}
32
+ paddingBottom="xs"
33
+ rating={3}
34
+ {...props}
35
+ />
36
+
37
+ </>
13
38
  )
14
39
 
15
40
  export default StarRatingHide
@@ -0,0 +1,6 @@
1
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 3, padding_bottom: "xs" }) %>
2
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 4, padding_bottom: "xs" }) %>
3
+ <%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
4
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 6, padding_bottom: "xs" }) %>
5
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 7, padding_bottom: "xs" }) %>
6
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 8, padding_bottom: "xs" }) %>
@@ -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