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.
- checksums.yaml +4 -4
- data/README.md +4 -6
- data/app/pb_kits/playbook/_playbook.scss +1 -0
- data/app/pb_kits/playbook/data/menu.yml +1 -1
- data/app/pb_kits/playbook/index.js +3 -0
- data/app/pb_kits/playbook/packs/examples.js +6 -0
- data/app/pb_kits/playbook/packs/site_styles/docs/_kit_doc.scss +22 -6
- data/app/pb_kits/playbook/pb_avatar/_avatar.jsx +5 -1
- data/app/pb_kits/playbook/pb_background/_background.html.erb +14 -0
- data/app/pb_kits/playbook/pb_background/_background.jsx +64 -0
- data/app/pb_kits/playbook/pb_background/_background.scss +15 -0
- data/app/pb_kits/playbook/pb_background/background.rb +36 -0
- data/app/pb_kits/playbook/pb_background/docs/_background_default.html.erb +41 -0
- data/app/pb_kits/playbook/pb_background/docs/_background_default.jsx +75 -0
- data/app/pb_kits/playbook/pb_background/docs/example.yml +8 -0
- data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_badge/_badge.jsx +4 -2
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/_button.jsx +5 -1
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +5 -1
- data/app/pb_kits/playbook/pb_caption/_caption.jsx +2 -2
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +5 -2
- data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +3 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_options.html.erb +10 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.jsx +130 -0
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.scss +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +39 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +29 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +28 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +117 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +53 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +30 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +45 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +30 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +45 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +11 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +9 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +5 -1
- data/app/pb_kits/playbook/pb_contact/_contact.jsx +5 -1
- data/app/pb_kits/playbook/pb_currency/_currency.jsx +5 -1
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +5 -1
- data/app/pb_kits/playbook/pb_date/date.rb +2 -1
- data/app/pb_kits/playbook/pb_date/docs/_date_default.html.erb +8 -1
- data/app/pb_kits/playbook/pb_date/docs/_date_timezone.html.erb +51 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_timezone.md +6 -0
- data/app/pb_kits/playbook/pb_date/docs/_description.md +2 -0
- data/app/pb_kits/playbook/pb_date/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +7 -4
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +0 -4
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +3 -3
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +8 -10
- data/app/pb_kits/playbook/pb_date_picker/docs/{_date_picker_read_only.html.erb → _date_picker_allow_input.html.erb} +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.jsx +13 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.md +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.jsx +34 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.md +3 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +3 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_calendar_input_icon.scss +1 -0
- data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx +5 -1
- data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +2 -2
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx +5 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +2 -2
- data/app/pb_kits/playbook/pb_flex/_flex.jsx +2 -2
- data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +6 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +3 -2
- data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +1 -1
- data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +2 -2
- data/app/pb_kits/playbook/pb_icon/_icon.jsx +2 -2
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.jsx +5 -1
- data/app/pb_kits/playbook/pb_image/_image.jsx +5 -1
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +5 -1
- data/app/pb_kits/playbook/pb_layout/_layout.jsx +4 -4
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +1 -1
- data/app/pb_kits/playbook/pb_list/_list.jsx +3 -2
- data/app/pb_kits/playbook/pb_list/_list_item.jsx +3 -2
- data/app/pb_kits/playbook/pb_logistic/_logistic.jsx +5 -1
- data/app/pb_kits/playbook/pb_message/_message.jsx +5 -1
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +5 -2
- data/app/pb_kits/playbook/pb_nav/_nav.jsx +2 -2
- data/app/pb_kits/playbook/pb_person/_person.jsx +5 -1
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +5 -1
- data/app/pb_kits/playbook/pb_popover/_popover.jsx +5 -1
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +4 -4
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +1 -1
- data/app/pb_kits/playbook/pb_radio/_radio.html.erb +1 -1
- data/app/pb_kits/playbook/pb_radio/docs/_radio_options.html.erb +9 -0
- data/app/pb_kits/playbook/pb_radio/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_radio/radio.rb +2 -4
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +1 -1
- data/app/pb_kits/playbook/pb_select/_select.scss +1 -1
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +2 -2
- data/app/pb_kits/playbook/pb_stat_value/_stat_value.jsx +3 -3
- data/app/pb_kits/playbook/pb_stat_value/docs/_stat_value_default.jsx +6 -1
- data/app/pb_kits/playbook/pb_table/_table.jsx +2 -2
- data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +17 -8
- data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +1 -1
- data/app/pb_kits/playbook/pb_time/_time.html.erb +23 -17
- data/app/pb_kits/playbook/pb_time/_time.jsx +22 -13
- data/app/pb_kits/playbook/pb_time/_time.scss +16 -8
- data/app/pb_kits/playbook/pb_time/docs/_time_align.html.erb +18 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +3 -3
- data/app/pb_kits/playbook/pb_time/docs/_time_default.html.erb +47 -3
- data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +33 -4
- data/app/pb_kits/playbook/pb_time/docs/_time_sizes.html.erb +11 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_sizes.jsx +19 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.html.erb +3 -1
- data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +0 -7
- data/app/pb_kits/playbook/pb_time/docs/_time_timezone.html.erb +38 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx +12 -14
- data/app/pb_kits/playbook/pb_time/docs/example.yml +6 -2
- data/app/pb_kits/playbook/pb_time/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_time/time.rb +14 -2
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +1 -1
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.jsx +3 -3
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +1 -1
- data/app/pb_kits/playbook/pb_title/_title.jsx +5 -1
- data/app/pb_kits/playbook/pb_title_count/_title_count.jsx +5 -1
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +1 -1
- data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +3 -3
- data/app/pb_kits/playbook/pb_toggle/_toggle.scss +41 -43
- data/app/pb_kits/playbook/pb_toggle/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_toggle/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_toggle/toggle.rb +2 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +60 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +20 -3
- data/app/pb_kits/playbook/pb_typeahead/components/Control.jsx +30 -0
- data/app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.jsx +13 -0
- data/app/pb_kits/playbook/pb_typeahead/components/MenuList.jsx +12 -0
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +51 -0
- data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +34 -0
- data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.jsx +13 -0
- data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.jsx +13 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx +22 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +29 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +84 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_summary.jsx +45 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +101 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_summary.jsx +27 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +8 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +4 -0
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +5 -2
- data/app/pb_kits/playbook/plugins/pb_chart.js +1 -1
- data/app/pb_kits/playbook/tokens/_typography.scss +3 -3
- data/lib/generators/kit/templates/kit_jsx.erb.tt +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +50 -8
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_read_only.jsx +0 -13
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_read_only.md +0 -1
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_size.html.erb +0 -11
- 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,
|
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
|
-
|
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={
|
36
|
-
<
|
37
|
-
|
38
|
-
|
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 !== '
|
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
|
-
<
|
51
|
-
size=
|
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 "../
|
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
|
-
|
22
|
-
font-weight: $
|
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*=
|
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
|
-
|
40
|
+
font-weight: $regular;
|
41
|
+
letter-spacing: $lspace_tight;
|
34
42
|
}
|
35
43
|
}
|
36
44
|
|
37
45
|
&.dark {
|
38
|
-
|
46
|
+
[class^=pb_caption_kit] {
|
39
47
|
color: $text_dk_default;
|
40
48
|
}
|
41
|
-
|
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="
|
9
|
+
size="md"
|
10
10
|
/>
|
11
11
|
<br />
|
12
12
|
<Time
|
13
13
|
align="center"
|
14
14
|
date={new Date()}
|
15
|
-
size="
|
15
|
+
size="md"
|
16
16
|
/>
|
17
17
|
<br />
|
18
18
|
<Time
|
19
19
|
align="right"
|
20
20
|
date={new Date()}
|
21
|
-
size="
|
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
|
-
|
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
|
-
|
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
|
-
|
18
|
+
showIcon
|
16
19
|
/>
|
17
20
|
<br />
|
18
21
|
<Time
|
19
|
-
date=
|
20
|
-
|
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,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
|
}) %>
|
@@ -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()
|
17
|
-
size="
|
16
|
+
date={new Date()}
|
17
|
+
size="md"
|
18
18
|
timeZone={zones.east}
|
19
19
|
/>
|
20
|
+
|
20
21
|
<br />
|
21
|
-
|
22
|
+
|
22
23
|
<h4>{'Central'}</h4>
|
23
24
|
<Time
|
24
|
-
date={new Date()
|
25
|
-
size="sm"
|
25
|
+
date={new Date()}
|
26
26
|
timeZone={zones.central}
|
27
27
|
/>
|
28
|
+
|
28
29
|
<br />
|
29
|
-
|
30
|
+
|
30
31
|
<h4>{'Mountain'}</h4>
|
31
32
|
<Time
|
32
|
-
date={new Date()
|
33
|
-
size="sm"
|
33
|
+
date={new Date()}
|
34
34
|
timeZone={zones.mountain}
|
35
35
|
/>
|
36
36
|
|
37
37
|
<br />
|
38
|
-
|
38
|
+
|
39
39
|
<h4>{'West Coast'}</h4>
|
40
40
|
<Time
|
41
|
-
date={new Date()
|
42
|
-
size="sm"
|
41
|
+
date={new Date()}
|
43
42
|
timeZone={zones.west}
|
44
43
|
/>
|
45
44
|
|
46
45
|
<br />
|
47
|
-
|
46
|
+
|
48
47
|
<h4>{'Tokyo, Japan'}</h4>
|
49
48
|
<Time
|
50
|
-
date={new Date(
|
51
|
-
size="sm"
|
49
|
+
date={new Date()}
|
52
50
|
timeZone={zones.asia}
|
53
51
|
/>
|
54
52
|
|