playbook_ui_docs 12.32.0 → 12.33.0.pre.alpha.PLAY905reactionbuttons979
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_button/docs/_button_reaction.html.erb +3 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_reaction.jsx +38 -0
- data/app/pb_kits/playbook/pb_button/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_button/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_date/docs/_date_alignment.jsx +2 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +4 -4
- data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +2 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_variants.jsx +5 -5
- data/app/pb_kits/playbook/pb_icon/docs/_icon_fa_kit.html.erb +1 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_fa_kit.jsx +21 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_fa_kit.md +7 -0
- data/app/pb_kits/playbook/pb_icon/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_icon/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.html.erb +6 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.jsx +9 -0
- data/dist/app/components/playbook/pb_docs/kit_example.rb +1 -0
- data/dist/playbook-doc.js +10 -15
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8f585d167dbfa609051c6f507cb1fe7037eba5fd06de48d61233cf040d1ce04
|
4
|
+
data.tar.gz: fd98212ad64c9c31a4f2d23efcd6eab983f53ef556c0d1d2a12fca5f9f8e4cef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '018119d788c070dd990de0a59da518dd7677a8accf7cc0f21694e5741646abffa543cd47db36583a220d28b74db9bd20eb4d03daa8c87f29eb22045f319fad9a'
|
7
|
+
data.tar.gz: e9c61269a27ca6050abd5e3e2982c9db5b88ab987729fd04dbb8057b459b822f5cac4bc78ea0384d157d2beb20e9ea491203f586cdf812a1a41ab0fd51dce4ce
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import React, {useState} from "react"
|
2
|
+
import { Button } from "../../"
|
3
|
+
|
4
|
+
const ButtonReaction = (props) => {
|
5
|
+
|
6
|
+
const [highlightActive, setHighlightActive] =useState(false)
|
7
|
+
|
8
|
+
return (
|
9
|
+
<div>
|
10
|
+
<Button
|
11
|
+
count={5}
|
12
|
+
icon="😍"
|
13
|
+
tabIndex={0}
|
14
|
+
variant="reaction"
|
15
|
+
{...props}
|
16
|
+
/>
|
17
|
+
<Button
|
18
|
+
count={153}
|
19
|
+
highlight = {highlightActive}
|
20
|
+
icon="🎉"
|
21
|
+
marginLeft='lg'
|
22
|
+
onClick={()=> setHighlightActive(!highlightActive)}
|
23
|
+
tabIndex={0}
|
24
|
+
variant="reaction"
|
25
|
+
{...props}
|
26
|
+
/>
|
27
|
+
<Button
|
28
|
+
marginLeft='lg'
|
29
|
+
tabIndex={0}
|
30
|
+
variant="reaction"
|
31
|
+
{...props}
|
32
|
+
/>
|
33
|
+
|
34
|
+
</div>
|
35
|
+
)
|
36
|
+
}
|
37
|
+
|
38
|
+
export default ButtonReaction
|
@@ -1,6 +1,7 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
3
|
- button_default: Button Variants
|
4
|
+
- button_reaction: Reaction Button
|
4
5
|
- button_full_width: Button Full Width
|
5
6
|
- button_link: Button Links
|
6
7
|
- button_loading: Button Loading
|
@@ -13,6 +14,7 @@ examples:
|
|
13
14
|
|
14
15
|
react:
|
15
16
|
- button_default: Button Variants
|
17
|
+
- button_reaction: Reaction Button
|
16
18
|
- button_full_width: Button Full Width
|
17
19
|
- button_link: Button Links
|
18
20
|
- button_loading: Button Loading
|
@@ -8,4 +8,5 @@ export { default as ButtonAccessibility } from './_button_accessibility.jsx'
|
|
8
8
|
export { default as ButtonOptions } from './_button_options.jsx'
|
9
9
|
export { default as ButtonSize } from './_button_size.jsx'
|
10
10
|
export { default as ButtonForm } from './_button_form.jsx'
|
11
|
-
export { default as ButtonHover } from './_button_hover.jsx'
|
11
|
+
export { default as ButtonHover } from './_button_hover.jsx'
|
12
|
+
export {default as ButtonReaction } from './_button_reaction.jsx'
|
@@ -7,7 +7,7 @@ const DateAlignment = (props) => {
|
|
7
7
|
<FormattedDate
|
8
8
|
dayOfWeek
|
9
9
|
icon
|
10
|
-
value=
|
10
|
+
value={new Date('25 Dec 1995')}
|
11
11
|
{...props}
|
12
12
|
/>
|
13
13
|
|
@@ -17,7 +17,7 @@ const DateAlignment = (props) => {
|
|
17
17
|
alignment="center"
|
18
18
|
dayOfWeek
|
19
19
|
icon
|
20
|
-
value=
|
20
|
+
value={new Date('25 Dec 2020')}
|
21
21
|
{...props}
|
22
22
|
/>
|
23
23
|
|
@@ -14,7 +14,7 @@ const DateDefault = (props) => {
|
|
14
14
|
|
15
15
|
<FormattedDate
|
16
16
|
size="sm"
|
17
|
-
value=
|
17
|
+
value={new Date('03 Aug 2012')}
|
18
18
|
{...props}
|
19
19
|
/>
|
20
20
|
|
@@ -23,7 +23,7 @@ const DateDefault = (props) => {
|
|
23
23
|
<FormattedDate
|
24
24
|
showDayOfWeek
|
25
25
|
size="sm"
|
26
|
-
value=
|
26
|
+
value={new Date('03 Dec 2017')}
|
27
27
|
{...props}
|
28
28
|
/>
|
29
29
|
|
@@ -38,7 +38,7 @@ const DateDefault = (props) => {
|
|
38
38
|
<br />
|
39
39
|
|
40
40
|
<FormattedDate
|
41
|
-
value=
|
41
|
+
value={new Date('03 Aug 2012')}
|
42
42
|
{...props}
|
43
43
|
/>
|
44
44
|
|
@@ -46,7 +46,7 @@ const DateDefault = (props) => {
|
|
46
46
|
|
47
47
|
<FormattedDate
|
48
48
|
showDayOfWeek
|
49
|
-
value=
|
49
|
+
value={new Date('03 Dec 2017')}
|
50
50
|
{...props}
|
51
51
|
/>
|
52
52
|
</>
|
@@ -21,7 +21,7 @@ const DateUnstyled = (props) => {
|
|
21
21
|
<Title size={1}>
|
22
22
|
<FormattedDate
|
23
23
|
unstyled
|
24
|
-
value=
|
24
|
+
value={new Date('25 Dec 1995')}
|
25
25
|
{...props}
|
26
26
|
/>
|
27
27
|
</Title>
|
@@ -36,7 +36,7 @@ const DateUnstyled = (props) => {
|
|
36
36
|
showDayOfWeek
|
37
37
|
showIcon
|
38
38
|
unstyled
|
39
|
-
value=
|
39
|
+
value={new Date('25 Dec 1995')}
|
40
40
|
{...props}
|
41
41
|
/>
|
42
42
|
</Caption>
|
@@ -7,7 +7,7 @@ const DateVariants = (props) => {
|
|
7
7
|
<FormattedDate
|
8
8
|
showIcon
|
9
9
|
size="sm"
|
10
|
-
value=
|
10
|
+
value={new Date('25 Dec 1995')}
|
11
11
|
{...props}
|
12
12
|
/>
|
13
13
|
|
@@ -15,7 +15,7 @@ const DateVariants = (props) => {
|
|
15
15
|
<br />
|
16
16
|
|
17
17
|
<FormattedDate
|
18
|
-
value=
|
18
|
+
value={new Date('25 Dec 1995')}
|
19
19
|
{...props}
|
20
20
|
/>
|
21
21
|
|
@@ -24,7 +24,7 @@ const DateVariants = (props) => {
|
|
24
24
|
|
25
25
|
<FormattedDate
|
26
26
|
showIcon
|
27
|
-
value=
|
27
|
+
value={new Date('25 Dec 1995')}
|
28
28
|
{...props}
|
29
29
|
/>
|
30
30
|
|
@@ -33,7 +33,7 @@ const DateVariants = (props) => {
|
|
33
33
|
|
34
34
|
<FormattedDate
|
35
35
|
showDayOfWeek
|
36
|
-
value=
|
36
|
+
value={new Date('25 Dec 1995')}
|
37
37
|
{...props}
|
38
38
|
/>
|
39
39
|
|
@@ -43,7 +43,7 @@ const DateVariants = (props) => {
|
|
43
43
|
<FormattedDate
|
44
44
|
showDayOfWeek
|
45
45
|
showIcon
|
46
|
-
value=
|
46
|
+
value={new Date('25 Dec 1995')}
|
47
47
|
{...props}
|
48
48
|
/>
|
49
49
|
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= pb_rails("icon", props: { icon: "powergon", font_style: "fak", fixed_width: true, size: "5x" }) %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Icon from '../_icon'
|
4
|
+
|
5
|
+
import '../../../../../../playbook-website/app/javascript/scripts/custom-icons'
|
6
|
+
|
7
|
+
const IconFaKit = (props) => {
|
8
|
+
return (
|
9
|
+
<div>
|
10
|
+
<Icon
|
11
|
+
{...props}
|
12
|
+
fixedWidth
|
13
|
+
fontStyle="fak"
|
14
|
+
icon="powergon"
|
15
|
+
size="5x"
|
16
|
+
/>
|
17
|
+
</div>
|
18
|
+
)
|
19
|
+
}
|
20
|
+
|
21
|
+
export default IconFaKit
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Our Icon kit allows integration with [FontAwesome's custom kit](https://fontawesome.com/v6/docs/web/setup/use-kit#contentHeader) functionality out-of-the-box.
|
2
|
+
|
3
|
+
All you need to do is 3 things:
|
4
|
+
1) Import your custom-icon.js file as outlined in the FontAwesome docs.
|
5
|
+
2) Use our fontStyle prop called "fak" so that our Icon component knows you are using a "fa-kit" icon.
|
6
|
+
3) Pass in your FaKit name as a string to our icon prop (This is the name that you designated when you uploaded the icon on their site).
|
7
|
+
|
@@ -8,6 +8,7 @@ examples:
|
|
8
8
|
- icon_border: Icon Border
|
9
9
|
- icon_sizes: Icon Sizes
|
10
10
|
- icon_custom: Icon Custom
|
11
|
+
- icon_fa_kit: Icon with FontAwesome Kit
|
11
12
|
|
12
13
|
react:
|
13
14
|
- icon_default: Icon Default
|
@@ -18,3 +19,4 @@ examples:
|
|
18
19
|
- icon_border: Icon Border
|
19
20
|
- icon_sizes: Icon Sizes
|
20
21
|
- icon_custom: Icon Custom
|
22
|
+
- icon_fa_kit: Icon with FontAwesome Kit
|
@@ -6,3 +6,4 @@ export { default as IconPull } from './_icon_pull.jsx'
|
|
6
6
|
export { default as IconBorder } from './_icon_border.jsx'
|
7
7
|
export { default as IconSizes } from './_icon_sizes.jsx'
|
8
8
|
export { default as IconCustom } from './_icon_custom.jsx'
|
9
|
+
export { default as IconFaKit} from './_icon_fa_kit.jsx'
|
@@ -57,6 +57,7 @@ module Playbook
|
|
57
57
|
.gsub("'../..'", "'playbook-ui'")
|
58
58
|
.gsub(%r{from "../.*}, "from 'playbook-ui'")
|
59
59
|
.gsub(%r{from '../.*}, "from 'playbook-ui'")
|
60
|
+
.gsub("'../../../../../../playbook-website/app/javascript/scripts/custom-icons'", "'your-directory/custom-icons.js'")
|
60
61
|
stringified_code = dark ? stringified_code.gsub("{...props}", "dark") : stringified_code.gsub(/\s*{...props}\s*\n/, "\n")
|
61
62
|
if stringified_code.include?("props: { ")
|
62
63
|
stringified_code = stringified_code.gsub("props: {", "props: {dark: true,") if type == "rails" && dark
|