playbook_ui 7.0.1.pre.alpha12 → 7.0.1.pre.alpha14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -6
  3. data/app/pb_kits/playbook/_playbook.scss +1 -0
  4. data/app/pb_kits/playbook/data/menu.yml +1 -1
  5. data/app/pb_kits/playbook/index.js +3 -0
  6. data/app/pb_kits/playbook/packs/examples.js +6 -0
  7. data/app/pb_kits/playbook/packs/site_styles/docs/_kit_doc.scss +22 -6
  8. data/app/pb_kits/playbook/pb_avatar/_avatar.jsx +5 -1
  9. data/app/pb_kits/playbook/pb_background/_background.html.erb +14 -0
  10. data/app/pb_kits/playbook/pb_background/_background.jsx +64 -0
  11. data/app/pb_kits/playbook/pb_background/_background.scss +15 -0
  12. data/app/pb_kits/playbook/pb_background/background.rb +36 -0
  13. data/app/pb_kits/playbook/pb_background/docs/_background_default.html.erb +41 -0
  14. data/app/pb_kits/playbook/pb_background/docs/_background_default.jsx +75 -0
  15. data/app/pb_kits/playbook/pb_background/docs/example.yml +8 -0
  16. data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
  17. data/app/pb_kits/playbook/pb_badge/_badge.jsx +4 -2
  18. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +1 -1
  19. data/app/pb_kits/playbook/pb_button/_button.jsx +5 -1
  20. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +5 -1
  21. data/app/pb_kits/playbook/pb_caption/_caption.jsx +2 -2
  22. data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +5 -2
  23. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +3 -1
  24. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_options.html.erb +10 -0
  25. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +1 -0
  26. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.html.erb +1 -1
  27. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.jsx +130 -0
  28. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.scss +1 -1
  29. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +39 -0
  30. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +29 -0
  31. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +28 -0
  32. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +117 -0
  33. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +53 -0
  34. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +30 -0
  35. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +45 -0
  36. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +30 -0
  37. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +45 -0
  38. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +11 -0
  39. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +9 -0
  40. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +5 -1
  41. data/app/pb_kits/playbook/pb_contact/_contact.jsx +5 -1
  42. data/app/pb_kits/playbook/pb_currency/_currency.jsx +5 -1
  43. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +5 -1
  44. data/app/pb_kits/playbook/pb_date/date.rb +2 -1
  45. data/app/pb_kits/playbook/pb_date/docs/_date_default.html.erb +8 -1
  46. data/app/pb_kits/playbook/pb_date/docs/_date_timezone.html.erb +51 -0
  47. data/app/pb_kits/playbook/pb_date/docs/_date_timezone.md +6 -0
  48. data/app/pb_kits/playbook/pb_date/docs/_description.md +2 -0
  49. data/app/pb_kits/playbook/pb_date/docs/example.yml +1 -0
  50. data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +7 -4
  51. data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +0 -4
  52. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +3 -3
  53. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +8 -10
  54. data/app/pb_kits/playbook/pb_date_picker/docs/{_date_picker_read_only.html.erb → _date_picker_allow_input.html.erb} +1 -1
  55. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.jsx +13 -0
  56. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.md +1 -0
  57. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.jsx +34 -0
  58. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.md +3 -0
  59. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +3 -2
  60. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -1
  61. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_calendar_input_icon.scss +1 -0
  62. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx +5 -1
  63. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +2 -2
  64. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx +5 -1
  65. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +2 -2
  66. data/app/pb_kits/playbook/pb_flex/_flex.jsx +2 -2
  67. data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +1 -1
  68. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +6 -1
  69. data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +3 -2
  70. data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +1 -1
  71. data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +1 -1
  72. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +2 -2
  73. data/app/pb_kits/playbook/pb_icon/_icon.jsx +2 -2
  74. data/app/pb_kits/playbook/pb_icon_value/_icon_value.jsx +5 -1
  75. data/app/pb_kits/playbook/pb_image/_image.jsx +5 -1
  76. data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +5 -1
  77. data/app/pb_kits/playbook/pb_layout/_layout.jsx +4 -4
  78. data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +1 -1
  79. data/app/pb_kits/playbook/pb_list/_list.jsx +3 -2
  80. data/app/pb_kits/playbook/pb_list/_list_item.jsx +3 -2
  81. data/app/pb_kits/playbook/pb_logistic/_logistic.jsx +5 -1
  82. data/app/pb_kits/playbook/pb_message/_message.jsx +5 -1
  83. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +5 -2
  84. data/app/pb_kits/playbook/pb_nav/_nav.jsx +2 -2
  85. data/app/pb_kits/playbook/pb_person/_person.jsx +5 -1
  86. data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +5 -1
  87. data/app/pb_kits/playbook/pb_popover/_popover.jsx +5 -1
  88. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +4 -4
  89. data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +1 -1
  90. data/app/pb_kits/playbook/pb_radio/_radio.html.erb +1 -1
  91. data/app/pb_kits/playbook/pb_radio/docs/_radio_options.html.erb +9 -0
  92. data/app/pb_kits/playbook/pb_radio/docs/example.yml +1 -0
  93. data/app/pb_kits/playbook/pb_radio/radio.rb +2 -4
  94. data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +1 -1
  95. data/app/pb_kits/playbook/pb_select/_select.scss +1 -1
  96. data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +2 -2
  97. data/app/pb_kits/playbook/pb_stat_value/_stat_value.jsx +3 -3
  98. data/app/pb_kits/playbook/pb_stat_value/docs/_stat_value_default.jsx +6 -1
  99. data/app/pb_kits/playbook/pb_table/_table.jsx +2 -2
  100. data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +1 -1
  101. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +17 -8
  102. data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +1 -1
  103. data/app/pb_kits/playbook/pb_time/_time.html.erb +23 -17
  104. data/app/pb_kits/playbook/pb_time/_time.jsx +22 -13
  105. data/app/pb_kits/playbook/pb_time/_time.scss +16 -8
  106. data/app/pb_kits/playbook/pb_time/docs/_time_align.html.erb +18 -0
  107. data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +3 -3
  108. data/app/pb_kits/playbook/pb_time/docs/_time_default.html.erb +47 -3
  109. data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +33 -4
  110. data/app/pb_kits/playbook/pb_time/docs/_time_sizes.html.erb +11 -0
  111. data/app/pb_kits/playbook/pb_time/docs/_time_sizes.jsx +19 -0
  112. data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.html.erb +3 -1
  113. data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +0 -7
  114. data/app/pb_kits/playbook/pb_time/docs/_time_timezone.html.erb +38 -0
  115. data/app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx +12 -14
  116. data/app/pb_kits/playbook/pb_time/docs/example.yml +6 -2
  117. data/app/pb_kits/playbook/pb_time/docs/index.js +1 -0
  118. data/app/pb_kits/playbook/pb_time/time.rb +14 -2
  119. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +1 -1
  120. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.jsx +3 -3
  121. data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +1 -1
  122. data/app/pb_kits/playbook/pb_title/_title.jsx +5 -1
  123. data/app/pb_kits/playbook/pb_title_count/_title_count.jsx +5 -1
  124. data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +1 -1
  125. data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +3 -3
  126. data/app/pb_kits/playbook/pb_toggle/_toggle.scss +41 -43
  127. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +0 -2
  128. data/app/pb_kits/playbook/pb_toggle/docs/index.js +0 -1
  129. data/app/pb_kits/playbook/pb_toggle/toggle.rb +2 -2
  130. data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +60 -0
  131. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +20 -3
  132. data/app/pb_kits/playbook/pb_typeahead/components/Control.jsx +30 -0
  133. data/app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.jsx +13 -0
  134. data/app/pb_kits/playbook/pb_typeahead/components/MenuList.jsx +12 -0
  135. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +51 -0
  136. data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +34 -0
  137. data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.jsx +13 -0
  138. data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.jsx +13 -0
  139. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx +22 -0
  140. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +29 -0
  141. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +84 -0
  142. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_summary.jsx +45 -0
  143. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +101 -0
  144. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_summary.jsx +27 -0
  145. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +8 -2
  146. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +4 -0
  147. data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +5 -2
  148. data/app/pb_kits/playbook/plugins/pb_chart.js +1 -1
  149. data/app/pb_kits/playbook/tokens/_typography.scss +3 -3
  150. data/lib/generators/kit/templates/kit_jsx.erb.tt +1 -1
  151. data/lib/playbook/version.rb +1 -1
  152. metadata +50 -8
  153. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_read_only.jsx +0 -13
  154. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_read_only.md +0 -1
  155. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_size.html.erb +0 -11
  156. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx +0 -44
@@ -7,24 +7,26 @@ import DateTime from '../pb_kit/dateTime.js'
7
7
  import { buildCss } from '../utilities/props'
8
8
  import { globalProps } from '../utilities/globalProps.js'
9
9
 
10
- import { Body, Icon, Title } from '../'
10
+ import { Body, Caption, Icon } from '../'
11
11
 
12
12
  type TimeProps = {
13
13
  align?: 'left' | 'center' | 'right',
14
14
  className?: string | array<string>,
15
15
  data?: string,
16
16
  date: string,
17
+ dark?: boolean,
17
18
  id?: string,
18
- size?: 'lg' | 'sm' | 'xs',
19
+ showIcon?: boolean,
20
+ size?: 'md' | 'sm',
19
21
  timeZone?: string,
20
22
  }
21
23
 
22
24
  const Time = (props: TimeProps) => {
23
- const { align, className, date, size, timeZone } = props
25
+ const { align, className, date, showIcon, size, timeZone } = props
24
26
  const classes = classnames(
25
- className,
26
27
  buildCss('pb_time_kit', align, size),
27
- globalProps(props)
28
+ globalProps(props),
29
+ className
28
30
  )
29
31
 
30
32
  const dateTimestamp = new DateTime({ value: date, zone: timeZone })
@@ -32,23 +34,30 @@ const Time = (props: TimeProps) => {
32
34
  return (
33
35
  <div className={classes}>
34
36
  <span className="pb_body_kit">
35
- <If condition={size === 'sm'}>
36
- <Icon
37
- fixedWidth
38
- icon="clock"
39
- />
37
+ <If condition={showIcon}>
38
+ <Body
39
+ color="light"
40
+ tag="span"
41
+ >
42
+ <Icon
43
+ fixedWidth
44
+ icon="clock"
45
+ size={size === 'md' ? 'lg' : 'sm'}
46
+ />
47
+ </Body>
40
48
  {' '}
41
49
  </If>
42
50
  <time dateTime={date}>
43
51
  <span>
44
- <If condition={size !== 'lg'}>
52
+ <If condition={size !== 'md'}>
45
53
  <Body
54
+ color="light"
46
55
  tag="span"
47
56
  text={dateTimestamp.toTimeWithMeridian()}
48
57
  />
49
58
  <Else />
50
- <Title
51
- size={3}
59
+ <Caption
60
+ size="lg"
52
61
  tag="span"
53
62
  text={dateTimestamp.toTimeWithMeridian()}
54
63
  />
@@ -2,9 +2,11 @@
2
2
  @import "../tokens/typography";
3
3
  @import "../pb_icon/icon";
4
4
  @import "../pb_body/body";
5
- @import "../pb_title/title";
5
+ @import "../pb_caption/caption";
6
6
 
7
7
  [class^=pb_time_kit] {
8
+ letter-spacing: $lspace_looser;
9
+ text-transform: uppercase;
8
10
  &[class*=_center] {
9
11
  text-align: center;
10
12
  }
@@ -18,27 +20,33 @@
18
20
  }
19
21
 
20
22
  [class^=pb_time_timezone] {
21
- font-size: $font-small;
22
- font-weight: $regular;
23
- color: $text-lt-light;
23
+ color: $text_lt_light;
24
+ font-weight: $bold;
24
25
 
25
26
  &::before {
26
27
  content: " ";
27
28
  }
28
29
  }
29
30
 
30
- &[class*=_lg] {
31
+ &[class*=_md] {
32
+ [class^=pb_caption_kit] {
33
+ color: $text_lt_default;
34
+ letter-spacing: $lspace_tight;
35
+ text-transform: capitalize;
36
+ }
31
37
  [class^=pb_time_timezone] {
38
+ color: $text_lt_light;
32
39
  font-size: $font-large !important;
33
- color: $text-lt-light;
40
+ font-weight: $regular;
41
+ letter-spacing: $lspace_tight;
34
42
  }
35
43
  }
36
44
 
37
45
  &.dark {
38
- & > * [class^=pb_title_kit] {
46
+ [class^=pb_caption_kit] {
39
47
  color: $text_dk_default;
40
48
  }
41
- & > * [class^=pb_body_kit] {
49
+ [class^=pb_body_kit] {
42
50
  color: $text_dk_light;
43
51
  }
44
52
  }
@@ -0,0 +1,18 @@
1
+ <%= pb_rails("time", props: {
2
+ time: DateTime.now,
3
+ align: "left"
4
+ }) %>
5
+
6
+ <br>
7
+
8
+ <%= pb_rails("time", props: {
9
+ time: Time.now,
10
+ align: "center"
11
+ }) %>
12
+
13
+ <br>
14
+
15
+ <%= pb_rails("time", props: {
16
+ time: Time.now,
17
+ align: "right"
18
+ }) %>
@@ -6,19 +6,19 @@ const TimeAlign = () => {
6
6
  <div>
7
7
  <Time
8
8
  date={new Date()}
9
- size="lg"
9
+ size="md"
10
10
  />
11
11
  <br />
12
12
  <Time
13
13
  align="center"
14
14
  date={new Date()}
15
- size="lg"
15
+ size="md"
16
16
  />
17
17
  <br />
18
18
  <Time
19
19
  align="right"
20
20
  date={new Date()}
21
- size="lg"
21
+ size="md"
22
22
  />
23
23
  </div>
24
24
  )
@@ -1,18 +1,62 @@
1
1
  <%= pb_rails("time", props: {
2
+ show_timezone: false,
2
3
  time: Time.now,
3
- size: "lg"
4
4
  }) %>
5
5
 
6
6
  <br>
7
7
 
8
8
  <%= pb_rails("time", props: {
9
9
  time: DateTime.now,
10
- size: "sm"
10
+ timezone: "America/Chicago"
11
11
  }) %>
12
12
 
13
13
  <br>
14
14
 
15
15
  <%= pb_rails("time", props: {
16
16
  time: "2012-08-02T15:49:29Z",
17
- size: "xs"
17
+ show_icon: true,
18
+ show_timezone: false,
19
+ }) %>
20
+
21
+ <br>
22
+
23
+ <%= pb_rails("time", props: {
24
+ time: "2012-08-02T15:49:29Z",
25
+ show_icon: true,
26
+ timezone: "America/Chicago"
27
+ }) %>
28
+
29
+ <br>
30
+ <br>
31
+
32
+ <%= pb_rails("time", props: {
33
+ time: Time.now,
34
+ size: "md",
35
+ show_timezone: false,
36
+ }) %>
37
+
38
+ <br>
39
+
40
+ <%= pb_rails("time", props: {
41
+ size: "md",
42
+ time: DateTime.now,
43
+ timezone: "America/New_York",
44
+ }) %>
45
+
46
+ <br>
47
+
48
+ <%= pb_rails("time", props: {
49
+ show_icon: true,
50
+ size: "md",
51
+ show_timezone: false,
52
+ time: "2012-08-02T15:49:29Z",
53
+ }) %>
54
+
55
+ <br>
56
+
57
+ <%= pb_rails("time", props: {
58
+ show_icon: true,
59
+ size: "md",
60
+ time: "2012-08-02T15:49:29Z",
61
+ timezone: "America/New_York",
18
62
  }) %>
@@ -4,20 +4,49 @@ import Time from '../_time.jsx'
4
4
  const TimeDefault = () => {
5
5
  return (
6
6
  <div>
7
+ <Time
8
+ date={new Date().getTime()}
9
+ />
10
+ <br />
7
11
  <Time
8
12
  date={new Date()}
9
- size="lg"
10
13
  timeZone="America/New_York"
11
14
  />
12
15
  <br />
13
16
  <Time
14
17
  date={new Date().getTime()}
15
- size="sm"
18
+ showIcon
16
19
  />
17
20
  <br />
18
21
  <Time
19
- date="2012-08-02T09:49:29Z"
20
- size="xs"
22
+ date={new Date()}
23
+ showIcon
24
+ timeZone="America/New_York"
25
+ />
26
+ <br />
27
+ <br />
28
+ <Time
29
+ date={new Date()}
30
+ size="md"
31
+ />
32
+ <br />
33
+ <Time
34
+ date={new Date()}
35
+ size="md"
36
+ timeZone="America/New_York"
37
+ />
38
+ <br />
39
+ <Time
40
+ date={new Date()}
41
+ showIcon
42
+ size="md"
43
+ />
44
+ <br />
45
+ <Time
46
+ date={new Date()}
47
+ showIcon
48
+ size="md"
49
+ timeZone="America/New_York"
21
50
  />
22
51
  </div>
23
52
  )
@@ -0,0 +1,11 @@
1
+ <%= pb_rails("time", props: {
2
+ time: DateTime.now,
3
+ size: "sm"
4
+ }) %>
5
+
6
+ <br>
7
+
8
+ <%= pb_rails("time", props: {
9
+ time: Time.now,
10
+ size: "md"
11
+ }) %>
@@ -0,0 +1,19 @@
1
+ import React, { Fragment } from 'react'
2
+ import Time from '../_time.jsx'
3
+
4
+ const TimeSizes = () => {
5
+ return (
6
+ <Fragment>
7
+ <Time
8
+ date={new Date()}
9
+ />
10
+ <br />
11
+ <Time
12
+ date={new Date()}
13
+ size="md"
14
+ />
15
+ </Fragment>
16
+ )
17
+ }
18
+
19
+ export default TimeSizes
@@ -1,10 +1,12 @@
1
1
  <%= pb_rails("time", props: {
2
+ show_timezone: false,
2
3
  time: "2012-08-02T15:49:29Z"
3
4
  }) %>
4
5
 
5
6
  <br>
6
7
 
7
8
  <%= pb_rails("time", props: {
9
+ show_timezone: false,
8
10
  time: DateTime.now
9
11
  }) %>
10
12
 
@@ -12,5 +14,5 @@
12
14
 
13
15
  <%= pb_rails("time", props: {
14
16
  time: DateTime.now,
15
- timezone: "America/Chicago"
17
+ timezone: "America/Chicago",
16
18
  }) %>
@@ -15,13 +15,6 @@ const TimeStamp = () => {
15
15
  date={new Date().getTime()}
16
16
  size="sm"
17
17
  />
18
-
19
- <br />
20
-
21
- <Time
22
- date="2012-08-02T15:49:29Z"
23
- size="sm"
24
- />
25
18
  </div>
26
19
  )
27
20
  }
@@ -0,0 +1,38 @@
1
+ <h4>East Coast</h4>
2
+ <%= pb_rails("time", props: {
3
+ time: Time.now,
4
+ timezone: "America/New_York"
5
+ }) %>
6
+
7
+ <br>
8
+
9
+ <h4>Central</h4>
10
+ <%= pb_rails("time", props: {
11
+ time: Time.now,
12
+ timezone: "America/Chicago"
13
+ }) %>
14
+
15
+ <br>
16
+
17
+ <h4>Mountain</h4>
18
+ <%= pb_rails("time", props: {
19
+ time: Time.now,
20
+ timezone: "America/Denver"
21
+ }) %>
22
+
23
+ <br>
24
+
25
+ <h4>West Coast</h4>
26
+ <%= pb_rails("time", props: {
27
+ show_timezone: true,
28
+ time: Time.now,
29
+ timezone: "America/Los_Angeles"
30
+ }) %>
31
+
32
+ <br>
33
+
34
+ <h4>Toyko, Japan</h4>
35
+ <%= pb_rails("time", props: {
36
+ time: Time.now,
37
+ timezone: "Asia/Tokyo",
38
+ }) %>
@@ -13,42 +13,40 @@ const TimeTimeZone = () => {
13
13
  <div>
14
14
  <h4>{'East Coast'}</h4>
15
15
  <Time
16
- date={new Date().toLocaleString('en-US', { timeZone: zones.east })}
17
- size="lg"
16
+ date={new Date()}
17
+ size="md"
18
18
  timeZone={zones.east}
19
19
  />
20
+
20
21
  <br />
21
- <br />
22
+
22
23
  <h4>{'Central'}</h4>
23
24
  <Time
24
- date={new Date().toLocaleString('en-US', { timeZone: zones.central })}
25
- size="sm"
25
+ date={new Date()}
26
26
  timeZone={zones.central}
27
27
  />
28
+
28
29
  <br />
29
- <br />
30
+
30
31
  <h4>{'Mountain'}</h4>
31
32
  <Time
32
- date={new Date().toLocaleString('en-US', { timeZone: zones.mountain })}
33
- size="sm"
33
+ date={new Date()}
34
34
  timeZone={zones.mountain}
35
35
  />
36
36
 
37
37
  <br />
38
- <br />
38
+
39
39
  <h4>{'West Coast'}</h4>
40
40
  <Time
41
- date={new Date().toLocaleString('en-US', { timeZone: zones.west })}
42
- size="sm"
41
+ date={new Date()}
43
42
  timeZone={zones.west}
44
43
  />
45
44
 
46
45
  <br />
47
- <br />
46
+
48
47
  <h4>{'Tokyo, Japan'}</h4>
49
48
  <Time
50
- date={new Date('2012-08-02T09:49:29Z').toLocaleString('en-US', { timeZone: zones.asia })}
51
- size="sm"
49
+ date={new Date()}
52
50
  timeZone={zones.asia}
53
51
  />
54
52