playbook_ui 12.30.1.pre.alpha.PLAY802responsivetitlekit909 → 12.30.1.pre.alpha.hovertesting914
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/_playbook.scss +2 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_hover.jsx +130 -0
- data/app/pb_kits/playbook/pb_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_message/docs/_message_default.jsx +33 -45
- data/app/pb_kits/playbook/pb_message/docs/_message_hover.jsx +41 -0
- data/app/pb_kits/playbook/pb_message/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_message/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_title/_title.scss +0 -18
- data/app/pb_kits/playbook/pb_title/_title.tsx +2 -20
- data/app/pb_kits/playbook/pb_title/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_title/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_title/title.rb +4 -21
- data/app/pb_kits/playbook/pb_title/title.test.js +29 -42
- data/app/pb_kits/playbook/tokens/_scale.scss +9 -0
- data/app/pb_kits/playbook/tokens/exports/_scale.scss +13 -0
- data/app/pb_kits/playbook/utilities/_border_radius.scss +31 -0
- data/app/pb_kits/playbook/utilities/_colors.scss +3 -0
- data/app/pb_kits/playbook/utilities/_hover.scss +47 -0
- data/app/pb_kits/playbook/utilities/globalProps.ts +22 -2
- data/dist/playbook-rails.js +6 -6
- data/lib/playbook/version.rb +1 -1
- metadata +7 -4
- data/app/pb_kits/playbook/pb_title/docs/_title_responsive.html.erb +0 -1
- data/app/pb_kits/playbook/pb_title/docs/_title_responsive.jsx +0 -16
- data/app/pb_kits/playbook/pb_title/docs/_title_responsive.md +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e94ee5e2d1744b1c8cb4257f6cbabe864f3cbe7f7a23c89ecbbf704d96e0881c
|
4
|
+
data.tar.gz: 63d9209ce6bdced8f6c934971d2b0ca8d8e67a4ca683a289091fdf7c70e894a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 405c56bbb3852436d2792bb9b90ecb9dbdc85601201f6fc1e89b7942f1dc0cc822050b0c3bdf2f2ae7966d14c1eeae5330c026c3ebebfcabd537881b2a24342d
|
7
|
+
data.tar.gz: 2eac3a3bc6353031c3f242191866eeba63789609ea03d2d3ee199720c6035f1636da744cf3ce0ca3a9e8a34fe602c4b2776613a17853c9921d5bef607ee7e60a
|
@@ -0,0 +1,130 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import { Button } from "../../"
|
3
|
+
|
4
|
+
const ButtonHover = (props) => (
|
5
|
+
<div>
|
6
|
+
<div>
|
7
|
+
<Button
|
8
|
+
hover={{ background: "info" }}
|
9
|
+
marginRight='lg'
|
10
|
+
onClick={() => alert("button clicked!")}
|
11
|
+
tabIndex={0}
|
12
|
+
text='Color 1'
|
13
|
+
{...props}
|
14
|
+
/>{" "}
|
15
|
+
<Button
|
16
|
+
hover={{ background: "success_subtle" }}
|
17
|
+
marginRight='lg'
|
18
|
+
onClick={() => alert("button clicked!")}
|
19
|
+
tabIndex={0}
|
20
|
+
text='Color 2'
|
21
|
+
variant='secondary'
|
22
|
+
{...props}
|
23
|
+
/>{" "}
|
24
|
+
<Button
|
25
|
+
hover={{ background: "warning_subtle" }}
|
26
|
+
marginRight='lg'
|
27
|
+
onClick={() => alert("button clicked!")}
|
28
|
+
tabIndex={0}
|
29
|
+
text='Color 3'
|
30
|
+
variant='link'
|
31
|
+
{...props}
|
32
|
+
/>
|
33
|
+
</div>
|
34
|
+
<div>
|
35
|
+
<Button
|
36
|
+
hover={{ shadow: "deep" }}
|
37
|
+
marginRight='lg'
|
38
|
+
marginTop='xl'
|
39
|
+
onClick={() => alert("button clicked!")}
|
40
|
+
tabIndex={0}
|
41
|
+
text='Shadow Deep'
|
42
|
+
{...props}
|
43
|
+
/>{" "}
|
44
|
+
<Button
|
45
|
+
hover={{ shadow: "deeper" }}
|
46
|
+
marginRight='lg'
|
47
|
+
marginTop='xl'
|
48
|
+
onClick={() => alert("button clicked!")}
|
49
|
+
tabIndex={0}
|
50
|
+
text='Shadow Deeper'
|
51
|
+
variant='secondary'
|
52
|
+
{...props}
|
53
|
+
/>{" "}
|
54
|
+
<Button
|
55
|
+
hover={{ shadow: "deepest" }}
|
56
|
+
marginRight='lg'
|
57
|
+
marginTop='xl'
|
58
|
+
onClick={() => alert("button clicked!")}
|
59
|
+
tabIndex={0}
|
60
|
+
text='Shadow Deepest'
|
61
|
+
variant='link'
|
62
|
+
{...props}
|
63
|
+
/>
|
64
|
+
</div>
|
65
|
+
<div>
|
66
|
+
<Button
|
67
|
+
hover={{ scale: "sm" }}
|
68
|
+
marginRight='lg'
|
69
|
+
marginTop='xl'
|
70
|
+
onClick={() => alert("button clicked!")}
|
71
|
+
tabIndex={0}
|
72
|
+
text='Scale Small'
|
73
|
+
{...props}
|
74
|
+
/>{" "}
|
75
|
+
<Button
|
76
|
+
hover={{ scale: "md" }}
|
77
|
+
marginRight='lg'
|
78
|
+
marginTop='xl'
|
79
|
+
onClick={() => alert("button clicked!")}
|
80
|
+
tabIndex={0}
|
81
|
+
text='Scale Medium'
|
82
|
+
variant='secondary'
|
83
|
+
{...props}
|
84
|
+
/>{" "}
|
85
|
+
<Button
|
86
|
+
hover={{ scale: "lg" }}
|
87
|
+
marginRight='lg'
|
88
|
+
marginTop='xl'
|
89
|
+
onClick={() => alert("button clicked!")}
|
90
|
+
tabIndex={0}
|
91
|
+
text='Scale Large'
|
92
|
+
variant='link'
|
93
|
+
{...props}
|
94
|
+
/>
|
95
|
+
</div>
|
96
|
+
<div>
|
97
|
+
<Button
|
98
|
+
hover={{ background: "error_subtle", shadow: "deep" }}
|
99
|
+
marginRight='lg'
|
100
|
+
marginTop='xl'
|
101
|
+
onClick={() => alert("button clicked!")}
|
102
|
+
tabIndex={0}
|
103
|
+
text='Multiple Attributes'
|
104
|
+
{...props}
|
105
|
+
/>{" "}
|
106
|
+
<Button
|
107
|
+
hover={{ background: "info_subtle", shadow: "deeper" }}
|
108
|
+
marginRight='lg'
|
109
|
+
marginTop='xl'
|
110
|
+
onClick={() => alert("button clicked!")}
|
111
|
+
tabIndex={0}
|
112
|
+
text='Multiple Attributes'
|
113
|
+
variant='secondary'
|
114
|
+
{...props}
|
115
|
+
/>{" "}
|
116
|
+
<Button
|
117
|
+
hover={{ background: "success_subtle", shadow: "deepest" }}
|
118
|
+
marginRight='lg'
|
119
|
+
marginTop='xl'
|
120
|
+
onClick={() => alert("button clicked!")}
|
121
|
+
tabIndex={0}
|
122
|
+
text='Multiple Attributes'
|
123
|
+
variant='link'
|
124
|
+
{...props}
|
125
|
+
/>
|
126
|
+
</div>
|
127
|
+
</div>
|
128
|
+
)
|
129
|
+
|
130
|
+
export default ButtonHover
|
@@ -8,3 +8,4 @@ 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'
|
@@ -1,43 +1,33 @@
|
|
1
|
-
import React from
|
1
|
+
import React from "react"
|
2
2
|
|
3
|
-
import Message from
|
4
|
-
import Image from
|
3
|
+
import Message from "../_message"
|
4
|
+
import Image from "../../pb_image/_image"
|
5
5
|
|
6
6
|
const MessageDefault = (props) => {
|
7
7
|
return (
|
8
8
|
<div>
|
9
9
|
<Message
|
10
|
-
avatarName=
|
11
|
-
avatarStatus=
|
12
|
-
avatarUrl=
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
avatarName='Mike Bishop'
|
11
|
+
avatarStatus='online'
|
12
|
+
avatarUrl='https://randomuser.me/api/portraits/men/50.jpg'
|
13
|
+
borderRadius='rounded'
|
14
|
+
label='Anna Black'
|
15
|
+
message='How can we assist you today?'
|
16
|
+
timestamp='20 seconds ago'
|
16
17
|
{...props}
|
17
18
|
/>
|
18
19
|
|
19
20
|
<br />
|
20
21
|
<br />
|
21
|
-
|
22
|
-
<Message
|
23
|
-
alignTimestamp="left"
|
24
|
-
avatarName="Wade Winningham"
|
25
|
-
avatarUrl="https://randomuser.me/api/portraits/men/14.jpg"
|
26
|
-
label="Patrick Welch"
|
27
|
-
message="We will escalate this issue to a Senior Support agent."
|
28
|
-
timestamp="9 minutes ago"
|
29
|
-
{...props}
|
30
|
-
/>
|
31
|
-
|
32
22
|
<br />
|
33
23
|
<br />
|
34
24
|
|
35
25
|
<Message
|
36
|
-
avatarName=
|
37
|
-
avatarUrl=
|
38
|
-
label=
|
39
|
-
message=
|
40
|
-
timestamp=
|
26
|
+
avatarName='Becca Jacobs'
|
27
|
+
avatarUrl='https://randomuser.me/api/portraits/women/50.jpg'
|
28
|
+
label='Lucille Sanchez'
|
29
|
+
message='Application for Kate Smith is waiting for your approval'
|
30
|
+
timestamp='2 days ago'
|
41
31
|
{...props}
|
42
32
|
/>
|
43
33
|
|
@@ -45,10 +35,10 @@ const MessageDefault = (props) => {
|
|
45
35
|
<br />
|
46
36
|
|
47
37
|
<Message
|
48
|
-
avatarName=
|
49
|
-
label=
|
50
|
-
message=
|
51
|
-
timestamp=
|
38
|
+
avatarName='Timothy Wenhold'
|
39
|
+
label='Beverly Reyes'
|
40
|
+
message='We are so sorry you had a bad experience!'
|
41
|
+
timestamp='2 days ago'
|
52
42
|
{...props}
|
53
43
|
/>
|
54
44
|
|
@@ -56,24 +46,23 @@ const MessageDefault = (props) => {
|
|
56
46
|
<br />
|
57
47
|
|
58
48
|
<Message
|
59
|
-
label=
|
60
|
-
message=
|
61
|
-
timestamp=
|
49
|
+
label='Keith Craig'
|
50
|
+
message='Please hold for one moment, I will check with my manager.'
|
51
|
+
timestamp='2 days ago'
|
62
52
|
{...props}
|
63
53
|
/>
|
64
54
|
|
65
55
|
<br />
|
66
56
|
<br />
|
67
57
|
|
68
|
-
<Message
|
69
|
-
|
70
|
-
timestamp="2 days ago"
|
58
|
+
<Message label='Keith Craig'
|
59
|
+
timestamp='2 days ago'
|
71
60
|
{...props}
|
72
61
|
>
|
73
62
|
<Image
|
74
|
-
alt=
|
75
|
-
size=
|
76
|
-
url=
|
63
|
+
alt='picture of a misty forest'
|
64
|
+
size='md'
|
65
|
+
url='https://unsplash.it/500/400/?image=634'
|
77
66
|
/>
|
78
67
|
</Message>
|
79
68
|
|
@@ -81,18 +70,17 @@ const MessageDefault = (props) => {
|
|
81
70
|
<br />
|
82
71
|
|
83
72
|
<Message
|
84
|
-
label=
|
85
|
-
message=
|
86
|
-
timestamp=
|
73
|
+
label='Keith Craig'
|
74
|
+
message='Please hold for one moment, I will check with my manager.'
|
75
|
+
timestamp='2 days ago'
|
87
76
|
{...props}
|
88
77
|
>
|
89
78
|
<Image
|
90
|
-
alt=
|
91
|
-
size=
|
92
|
-
url=
|
79
|
+
alt='picture of a misty forest'
|
80
|
+
size='md'
|
81
|
+
url='https://unsplash.it/500/400/?image=634'
|
93
82
|
/>
|
94
83
|
</Message>
|
95
|
-
|
96
84
|
</div>
|
97
85
|
)
|
98
86
|
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import React from "react"
|
2
|
+
|
3
|
+
import Message from "../_message"
|
4
|
+
|
5
|
+
const MessageHover = (props) => {
|
6
|
+
return (
|
7
|
+
<div>
|
8
|
+
<Message
|
9
|
+
avatarName='Mike Bishop'
|
10
|
+
avatarStatus='online'
|
11
|
+
avatarUrl='https://randomuser.me/api/portraits/men/50.jpg'
|
12
|
+
borderRadius='rounded'
|
13
|
+
hover={{ background: "success_subtle" }}
|
14
|
+
label='Anna Black'
|
15
|
+
message='How can we assist you today?'
|
16
|
+
padding="xs"
|
17
|
+
{...props}
|
18
|
+
/>
|
19
|
+
|
20
|
+
<br />
|
21
|
+
<br />
|
22
|
+
<br />
|
23
|
+
|
24
|
+
<Message
|
25
|
+
avatarName='Becca Jacobs'
|
26
|
+
avatarUrl='https://randomuser.me/api/portraits/women/50.jpg'
|
27
|
+
borderRadius='rounded'
|
28
|
+
hover={{ shadow: "deepest" }}
|
29
|
+
label='Lucille Sanchez'
|
30
|
+
message='Application for Kate Smith is waiting for your approval'
|
31
|
+
padding="xs"
|
32
|
+
{...props}
|
33
|
+
/>
|
34
|
+
|
35
|
+
<br />
|
36
|
+
|
37
|
+
</div>
|
38
|
+
)
|
39
|
+
}
|
40
|
+
|
41
|
+
export default MessageHover
|
@@ -1,6 +1,5 @@
|
|
1
1
|
@import "../tokens/titles";
|
2
2
|
@import "../tokens/colors";
|
3
|
-
@import "../tokens/screen_sizes";
|
4
3
|
@import './title_mixin';
|
5
4
|
|
6
5
|
[class^=pb_title_kit]{
|
@@ -34,21 +33,4 @@
|
|
34
33
|
&[class*=_thin] {
|
35
34
|
@include pb_title_thin;
|
36
35
|
}
|
37
|
-
|
38
|
-
@each $size, $size_value in $breakpoints_grid {
|
39
|
-
@each $title_size_value in [1, 2, 3, 4] {
|
40
|
-
$min_size: map-get($size_value, "min");
|
41
|
-
$max_size: map-get($size_value, "max");
|
42
|
-
&[class*=_#{$size}_#{$title_size_value}] {
|
43
|
-
@include break_on($min_size, $max_size) {
|
44
|
-
@if $title_size_value == 1 { @include pb_title_1; }
|
45
|
-
@else if $title_size_value == 2 { @include pb_title_2; }
|
46
|
-
@else if $title_size_value == 3 { @include pb_title_3; }
|
47
|
-
@else if $title_size_value == 4 { @include pb_title_4; }
|
48
|
-
@include title_colors;
|
49
|
-
@if $title_size_value != 4 { @include pb_title_bold; }
|
50
|
-
}
|
51
|
-
}
|
52
|
-
}
|
53
|
-
}
|
54
36
|
}
|
@@ -3,9 +3,6 @@ import classnames from 'classnames'
|
|
3
3
|
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
4
4
|
import { deprecatedProps, GlobalProps, globalProps } from '../utilities/globalProps'
|
5
5
|
|
6
|
-
type SizeType = 1 | 2 | 3 | 4 | "1" | "2" | "3" | "4"
|
7
|
-
type SizeResponsiveType = {[key: string]: SizeType}
|
8
|
-
|
9
6
|
type TitleProps = {
|
10
7
|
aria?: {[key: string]: string},
|
11
8
|
bold?: boolean,
|
@@ -14,7 +11,7 @@ type TitleProps = {
|
|
14
11
|
color?: "default" | "light" | "lighter" | "success" | "error" | "link",
|
15
12
|
data?: {[key: string]: string},
|
16
13
|
id?: string,
|
17
|
-
size?:
|
14
|
+
size?: 1 | 2| 3| 4 | "1" | "2" | "3" | "4",
|
18
15
|
tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div" | "span",
|
19
16
|
text?: string,
|
20
17
|
variant?: null | "link",
|
@@ -39,24 +36,9 @@ const Title = (props: TitleProps): React.ReactElement => {
|
|
39
36
|
const ariaProps: {[key: string]: string | number} = buildAriaProps(aria)
|
40
37
|
const dataProps: {[key: string]: string | number} = buildDataProps(data)
|
41
38
|
const getBold = bold ? '' : 'thin'
|
42
|
-
const isSizeNumberOrString = typeof size === "number" || typeof size === "string"
|
43
|
-
|
44
|
-
const buildResponsiveSizeCss = () => {
|
45
|
-
let css = ''
|
46
|
-
|
47
|
-
if (!isSizeNumberOrString) {
|
48
|
-
Object.entries(size).forEach((sizeObj) => {
|
49
|
-
css += `pb_title_kit_${sizeObj[0]}_${sizeObj[1]} `
|
50
|
-
})
|
51
|
-
}
|
52
|
-
|
53
|
-
return css.trim()
|
54
|
-
}
|
55
|
-
|
56
39
|
const classes = classnames(
|
57
|
-
buildCss('pb_title_kit',
|
40
|
+
buildCss('pb_title_kit', `size_${size}`, variant, color, getBold),
|
58
41
|
globalProps(props),
|
59
|
-
buildResponsiveSizeCss(),
|
60
42
|
className
|
61
43
|
)
|
62
44
|
const Tag: React.ReactElement | any = `${tag}`
|
@@ -3,10 +3,8 @@ examples:
|
|
3
3
|
- title_default: Default UI
|
4
4
|
- title_light_weight: Light Weight UI
|
5
5
|
- title_colors: Colors
|
6
|
-
- title_responsive: Responsive
|
7
6
|
|
8
7
|
react:
|
9
8
|
- title_default: Default UI
|
10
9
|
- title_light_weight: Light Weight UI
|
11
10
|
- title_colors: Colors
|
12
|
-
- title_responsive: Responsive
|
@@ -6,7 +6,9 @@ module Playbook
|
|
6
6
|
prop :color, type: Playbook::Props::Enum,
|
7
7
|
values: [nil, "default", "light", "lighter", "success", "error", "link"],
|
8
8
|
default: nil
|
9
|
-
prop :size,
|
9
|
+
prop :size, type: Playbook::Props::Enum,
|
10
|
+
values: [1, 2, 3, 4],
|
11
|
+
default: 3
|
10
12
|
prop :tag, type: Playbook::Props::Enum,
|
11
13
|
values: %w[h1 h2 h3 h4 h5 h6 p div span],
|
12
14
|
default: "h3"
|
@@ -18,31 +20,12 @@ module Playbook
|
|
18
20
|
prop :bold, type: Playbook::Props::Boolean, default: true
|
19
21
|
|
20
22
|
def classname
|
21
|
-
|
22
|
-
generate_classname("pb_title_kit", variant, color, is_bold) + generate_responsive_size_classname
|
23
|
-
else
|
24
|
-
generate_classname("pb_title_kit", size, variant, color, is_bold)
|
25
|
-
end
|
23
|
+
generate_classname("pb_title_kit", size, variant, color, is_bold)
|
26
24
|
end
|
27
25
|
|
28
26
|
def is_bold
|
29
27
|
bold ? nil : "thin"
|
30
28
|
end
|
31
|
-
|
32
|
-
def is_size_responsive
|
33
|
-
try(:size).is_a?(::Hash)
|
34
|
-
end
|
35
|
-
|
36
|
-
def generate_responsive_size_classname
|
37
|
-
css = ""
|
38
|
-
if is_size_responsive
|
39
|
-
size.each do |key, value|
|
40
|
-
css += " pb_title_kit_#{key}_#{value}"
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
css unless css.blank?
|
45
|
-
end
|
46
29
|
end
|
47
30
|
end
|
48
31
|
end
|
@@ -4,52 +4,39 @@ import { render, screen } from '../utilities/test-utils'
|
|
4
4
|
import Title from './_title'
|
5
5
|
|
6
6
|
test('returns namespaced class name', () => {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
render(
|
8
|
+
<Title
|
9
|
+
data={{ testid: 'primary-test' }}
|
10
|
+
text="Test colors"
|
11
|
+
/>
|
12
|
+
)
|
13
|
+
|
14
|
+
const kit = screen.getByTestId('primary-test')
|
15
|
+
expect(kit).toHaveClass('pb_title_kit_size_3')
|
16
16
|
})
|
17
17
|
|
18
18
|
test('with thin font weight', () => {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
19
|
+
render(
|
20
|
+
<Title
|
21
|
+
bold={false}
|
22
|
+
data={{ testid: 'primary-test' }}
|
23
|
+
text="Test thin font weight"
|
24
|
+
/>
|
25
|
+
)
|
26
|
+
|
27
|
+
const kit = screen.getByTestId('primary-test')
|
28
|
+
expect(kit).toHaveClass('pb_title_kit_size_3_thin')
|
29
29
|
})
|
30
30
|
|
31
31
|
test('with colors', () => {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
})
|
43
|
-
|
44
|
-
test('with responsive title', () => {
|
45
|
-
render(
|
46
|
-
<Title
|
47
|
-
data={{ testid: 'primary-test' }}
|
48
|
-
size={{ xs: "3", sm: "2", md: "1" }}
|
49
|
-
text="Responsive Title"
|
50
|
-
/>
|
51
|
-
)
|
52
|
-
|
53
|
-
const kit = screen.getByTestId('primary-test')
|
54
|
-
expect(kit).toHaveClass('pb_title_kit pb_title_kit_xs_3 pb_title_kit_sm_2 pb_title_kit_md_1')
|
32
|
+
render(
|
33
|
+
<Title
|
34
|
+
color="success"
|
35
|
+
data={{ testid: 'primary-test' }}
|
36
|
+
text="Test colors"
|
37
|
+
/>
|
38
|
+
)
|
39
|
+
|
40
|
+
const kit = screen.getByTestId('primary-test')
|
41
|
+
expect(kit).toHaveClass('pb_title_kit_size_3_success')
|
55
42
|
})
|
@@ -0,0 +1,31 @@
|
|
1
|
+
@import "../tokens/exports/border_radius";
|
2
|
+
|
3
|
+
$transition-speed: 0.2s;
|
4
|
+
|
5
|
+
.border_radius {
|
6
|
+
@mixin border-example {
|
7
|
+
transition: background-color $transition-speed ease, height $transition-speed ease;
|
8
|
+
}
|
9
|
+
|
10
|
+
&_rounded {
|
11
|
+
border-radius: $border_radius_rounded;
|
12
|
+
}
|
13
|
+
&_xl {
|
14
|
+
border-radius: $border_radius_xl;
|
15
|
+
}
|
16
|
+
&_lg {
|
17
|
+
border-radius: $border_radius_lg;
|
18
|
+
}
|
19
|
+
&_md {
|
20
|
+
border-radius: $border_radius_md;
|
21
|
+
}
|
22
|
+
&_sm {
|
23
|
+
border-radius: $border_radius_sm;
|
24
|
+
}
|
25
|
+
&_xs {
|
26
|
+
border-radius: $border_radius_xs;
|
27
|
+
}
|
28
|
+
&_none {
|
29
|
+
border-radius: $border_radius_none;
|
30
|
+
}
|
31
|
+
}
|
@@ -1,5 +1,7 @@
|
|
1
1
|
// Color Helper Utilities
|
2
2
|
|
3
|
+
$transition-speed: 0.2s;
|
4
|
+
|
3
5
|
@function shade($color, $percentage) {
|
4
6
|
@return mix($charcoal, $color, $percentage);
|
5
7
|
}
|
@@ -27,6 +29,7 @@
|
|
27
29
|
}
|
28
30
|
}
|
29
31
|
|
32
|
+
|
30
33
|
@mixin text-color($colors-list) {
|
31
34
|
@each $name, $color in $colors-list {
|
32
35
|
.#{$name} {
|