@dnanpm/styleguide 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/components/AccordionItem/AccordionItem.js +2 -1
- package/build/cjs/components/Button/ButtonIcon.d.ts +6 -0
- package/build/cjs/components/Button/ButtonIcon.js +5 -2
- package/build/cjs/components/Footer/Components/FooterComponents.js +12 -7
- package/build/cjs/components/InfoDialog/InfoDialog.d.ts +44 -0
- package/build/cjs/components/InfoDialog/InfoDialog.js +68 -0
- package/build/cjs/components/PriorityNavigation/PriorityNavigation.d.ts +36 -0
- package/build/cjs/components/PriorityNavigation/PriorityNavigation.js +230 -0
- package/build/cjs/components/PriorityNavigation/__tests__/PriorityNavigation.spec.d.ts +1 -0
- package/build/cjs/components/PriorityNavigationItem/PriorityNavigationItem.d.ts +34 -0
- package/build/cjs/components/PriorityNavigationItem/PriorityNavigationItem.js +62 -0
- package/build/cjs/components/PriorityNavigationItem/__tests__/PriorityNavigationItem.spec.d.ts +1 -0
- package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.d.ts +36 -32
- package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.js +52 -37
- package/build/cjs/components/Tab/Tab.d.ts +64 -0
- package/build/cjs/components/Tab/Tab.js +88 -0
- package/build/cjs/components/Tabs/Tabs.d.ts +9 -201
- package/build/cjs/components/Tabs/Tabs.js +38 -20
- package/build/cjs/components/index.d.ts +5 -2
- package/build/cjs/hooks/useResizeObserver.d.ts +3 -2
- package/build/cjs/hooks/useResizeObserver.js +5 -5
- package/build/cjs/hooks/useWindowSize.d.ts +3 -1
- package/build/cjs/hooks/useWindowSize.js +5 -6
- package/build/cjs/index.js +7 -3
- package/build/es/components/AccordionItem/AccordionItem.js +3 -2
- package/build/es/components/Button/ButtonIcon.d.ts +6 -0
- package/build/es/components/Button/ButtonIcon.js +5 -2
- package/build/es/components/Footer/Components/FooterComponents.js +13 -8
- package/build/es/components/InfoDialog/InfoDialog.d.ts +44 -0
- package/build/es/components/InfoDialog/InfoDialog.js +60 -0
- package/build/es/components/PriorityNavigation/PriorityNavigation.d.ts +36 -0
- package/build/es/components/PriorityNavigation/PriorityNavigation.js +222 -0
- package/build/es/components/PriorityNavigation/__tests__/PriorityNavigation.spec.d.ts +1 -0
- package/build/es/components/PriorityNavigationItem/PriorityNavigationItem.d.ts +34 -0
- package/build/es/components/PriorityNavigationItem/PriorityNavigationItem.js +54 -0
- package/build/es/components/PriorityNavigationItem/__tests__/PriorityNavigationItem.spec.d.ts +1 -0
- package/build/es/components/SecondaryNavigation/SecondaryNavigation.d.ts +36 -32
- package/build/es/components/SecondaryNavigation/SecondaryNavigation.js +52 -37
- package/build/es/components/Tab/Tab.d.ts +64 -0
- package/build/es/components/Tab/Tab.js +80 -0
- package/build/es/components/Tabs/Tabs.d.ts +9 -201
- package/build/es/components/Tabs/Tabs.js +39 -20
- package/build/es/components/index.d.ts +5 -2
- package/build/es/hooks/useResizeObserver.d.ts +3 -2
- package/build/es/hooks/useResizeObserver.js +5 -5
- package/build/es/hooks/useWindowSize.d.ts +3 -1
- package/build/es/hooks/useWindowSize.js +5 -6
- package/build/es/index.js +5 -2
- package/package.json +3 -2
- package/build/cjs/components/Tabs/Tab.d.ts +0 -182
- package/build/cjs/components/Tabs/Tab.js +0 -67
- package/build/es/components/Tabs/Tab.d.ts +0 -182
- package/build/es/components/Tabs/Tab.js +0 -58
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import React, { PureComponent } from 'react';
|
|
3
|
-
import type { Type } from './Tabs';
|
|
4
|
-
export interface TabProps {
|
|
5
|
-
activeTab?: string;
|
|
6
|
-
label: string;
|
|
7
|
-
tabStyle?: Type;
|
|
8
|
-
onClick?: (tab: string) => void;
|
|
9
|
-
children?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
export interface TabStyleProps {
|
|
12
|
-
isActive?: boolean;
|
|
13
|
-
tabStyle?: Type;
|
|
14
|
-
}
|
|
15
|
-
export declare const TabStyle: import("styled-components").StyledComponent<"li", {
|
|
16
|
-
base: {
|
|
17
|
-
baseHeight: {
|
|
18
|
-
value: number;
|
|
19
|
-
unit: string;
|
|
20
|
-
};
|
|
21
|
-
baseWidth: {
|
|
22
|
-
value: number;
|
|
23
|
-
unit: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
27
|
-
color: {
|
|
28
|
-
default: {
|
|
29
|
-
pink: string;
|
|
30
|
-
plum: string;
|
|
31
|
-
white: string;
|
|
32
|
-
black: string;
|
|
33
|
-
};
|
|
34
|
-
accent: {
|
|
35
|
-
lemon: string;
|
|
36
|
-
sky: string;
|
|
37
|
-
orange: string;
|
|
38
|
-
};
|
|
39
|
-
hover: {
|
|
40
|
-
pink: string;
|
|
41
|
-
};
|
|
42
|
-
text: {
|
|
43
|
-
gray: string;
|
|
44
|
-
pink: string;
|
|
45
|
-
plum: string;
|
|
46
|
-
white: string;
|
|
47
|
-
black: string;
|
|
48
|
-
};
|
|
49
|
-
line: {
|
|
50
|
-
L01: string;
|
|
51
|
-
L02: string;
|
|
52
|
-
L03: string;
|
|
53
|
-
L04: string;
|
|
54
|
-
};
|
|
55
|
-
notification: {
|
|
56
|
-
info: string;
|
|
57
|
-
success: string;
|
|
58
|
-
warning: string;
|
|
59
|
-
error: string;
|
|
60
|
-
};
|
|
61
|
-
background: {
|
|
62
|
-
sand: {
|
|
63
|
-
default: string;
|
|
64
|
-
E01: string;
|
|
65
|
-
E02: string;
|
|
66
|
-
};
|
|
67
|
-
pink: {
|
|
68
|
-
default: string;
|
|
69
|
-
E01: string;
|
|
70
|
-
E02: string;
|
|
71
|
-
};
|
|
72
|
-
plum: {
|
|
73
|
-
default: string;
|
|
74
|
-
E01: string;
|
|
75
|
-
E02: string;
|
|
76
|
-
};
|
|
77
|
-
lemon: {
|
|
78
|
-
default: string;
|
|
79
|
-
E01: string;
|
|
80
|
-
E02: string;
|
|
81
|
-
};
|
|
82
|
-
sky: {
|
|
83
|
-
default: string;
|
|
84
|
-
E01: string;
|
|
85
|
-
E02: string;
|
|
86
|
-
};
|
|
87
|
-
orange: {
|
|
88
|
-
default: string;
|
|
89
|
-
E01: string;
|
|
90
|
-
E02: string;
|
|
91
|
-
};
|
|
92
|
-
white: {
|
|
93
|
-
default: string;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
focus: {
|
|
97
|
-
dark: string;
|
|
98
|
-
light: string;
|
|
99
|
-
};
|
|
100
|
-
transparency: {
|
|
101
|
-
T0: string;
|
|
102
|
-
T10: string;
|
|
103
|
-
T20: string;
|
|
104
|
-
T30: string;
|
|
105
|
-
T40: string;
|
|
106
|
-
T50: string;
|
|
107
|
-
T60: string;
|
|
108
|
-
T70: string;
|
|
109
|
-
T80: string;
|
|
110
|
-
T90: string;
|
|
111
|
-
T100: string;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
fontFamily: {
|
|
115
|
-
default: string;
|
|
116
|
-
heading: string;
|
|
117
|
-
numerals: string;
|
|
118
|
-
};
|
|
119
|
-
fontSize: {
|
|
120
|
-
default: string;
|
|
121
|
-
xl: string;
|
|
122
|
-
l: string;
|
|
123
|
-
s: string;
|
|
124
|
-
xs: string;
|
|
125
|
-
h1XL: string;
|
|
126
|
-
h1L: string;
|
|
127
|
-
h1M: string;
|
|
128
|
-
h1S: string;
|
|
129
|
-
h2M: string;
|
|
130
|
-
h2S: string;
|
|
131
|
-
h3: string;
|
|
132
|
-
h4: string;
|
|
133
|
-
h5: string;
|
|
134
|
-
h1: string;
|
|
135
|
-
h2: string;
|
|
136
|
-
};
|
|
137
|
-
fontWeight: {
|
|
138
|
-
book: number;
|
|
139
|
-
medium: number;
|
|
140
|
-
bold: number;
|
|
141
|
-
black: number;
|
|
142
|
-
};
|
|
143
|
-
form: {
|
|
144
|
-
smallSelectWidth: string;
|
|
145
|
-
smallSelectHeight: string;
|
|
146
|
-
};
|
|
147
|
-
grid: {
|
|
148
|
-
gutter: string;
|
|
149
|
-
};
|
|
150
|
-
lineHeight: {
|
|
151
|
-
default: string;
|
|
152
|
-
xl: string;
|
|
153
|
-
s: string;
|
|
154
|
-
xs: string;
|
|
155
|
-
xxs: string;
|
|
156
|
-
auto: string;
|
|
157
|
-
h1XL: string;
|
|
158
|
-
h1L: string;
|
|
159
|
-
h1M: string;
|
|
160
|
-
h1S: string;
|
|
161
|
-
h2M: string;
|
|
162
|
-
h2S: string;
|
|
163
|
-
h3: string;
|
|
164
|
-
h4: string;
|
|
165
|
-
h5: string;
|
|
166
|
-
h1: string;
|
|
167
|
-
h2: string;
|
|
168
|
-
};
|
|
169
|
-
media: Record<string | number, (l: TemplateStringsArray, ...p: (string | number)[]) => string>;
|
|
170
|
-
radius: {
|
|
171
|
-
default: string;
|
|
172
|
-
s: string;
|
|
173
|
-
xs: string;
|
|
174
|
-
circle: string;
|
|
175
|
-
pill: string;
|
|
176
|
-
};
|
|
177
|
-
}, TabStyleProps, never>;
|
|
178
|
-
declare class Tab extends PureComponent<TabProps> {
|
|
179
|
-
onClick: () => void;
|
|
180
|
-
render(): React.JSX.Element;
|
|
181
|
-
}
|
|
182
|
-
export default Tab;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var styled = require('../../themes/styled.js');
|
|
7
|
-
var theme = require('../../themes/theme.js');
|
|
8
|
-
var styledUtils = require('../../utils/styledUtils.js');
|
|
9
|
-
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
-
|
|
14
|
-
const TabStyle = styled["default"].li `
|
|
15
|
-
display: inline-block;
|
|
16
|
-
list-style: none;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
padding: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 0.8)}
|
|
19
|
-
${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 1.6)};
|
|
20
|
-
color: ${theme["default"].color.text.black};
|
|
21
|
-
font-size: ${theme["default"].fontSize.default};
|
|
22
|
-
line-height: ${theme["default"].lineHeight.default};
|
|
23
|
-
font-weight: ${theme["default"].fontWeight.book};
|
|
24
|
-
margin-right: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 2)};
|
|
25
|
-
|
|
26
|
-
&:last-child {
|
|
27
|
-
margin-right: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
${({ isActive }) => isActive &&
|
|
31
|
-
`
|
|
32
|
-
color: ${theme["default"].color.text.pink};
|
|
33
|
-
background-color: ${theme["default"].color.background.sand.E01};
|
|
34
|
-
`}
|
|
35
|
-
|
|
36
|
-
/* Underlined style modifications (legacy) */
|
|
37
|
-
${({ tabStyle }) => tabStyle === 'underlined' &&
|
|
38
|
-
`
|
|
39
|
-
padding: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 1.6)} 0;
|
|
40
|
-
margin-right: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 3)};
|
|
41
|
-
`}
|
|
42
|
-
|
|
43
|
-
${({ isActive, tabStyle }) => isActive &&
|
|
44
|
-
tabStyle === 'underlined' &&
|
|
45
|
-
`
|
|
46
|
-
border-bottom: 2px solid ${theme["default"].color.default.pink};
|
|
47
|
-
background-color: transparent;
|
|
48
|
-
`}
|
|
49
|
-
`;
|
|
50
|
-
class Tab extends React.PureComponent {
|
|
51
|
-
constructor() {
|
|
52
|
-
super(...arguments);
|
|
53
|
-
this.onClick = () => {
|
|
54
|
-
const { label, onClick } = this.props;
|
|
55
|
-
if (onClick) {
|
|
56
|
-
onClick(label);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
const { onClick, props: { activeTab, label, tabStyle }, } = this;
|
|
62
|
-
return (React__default["default"].createElement(TabStyle, { role: "tab", "aria-selected": activeTab === label, isActive: activeTab === label, tabStyle: tabStyle, onClick: onClick }, label));
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
exports.TabStyle = TabStyle;
|
|
67
|
-
exports["default"] = Tab;
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import React, { PureComponent } from 'react';
|
|
3
|
-
import type { Type } from './Tabs';
|
|
4
|
-
export interface TabProps {
|
|
5
|
-
activeTab?: string;
|
|
6
|
-
label: string;
|
|
7
|
-
tabStyle?: Type;
|
|
8
|
-
onClick?: (tab: string) => void;
|
|
9
|
-
children?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
export interface TabStyleProps {
|
|
12
|
-
isActive?: boolean;
|
|
13
|
-
tabStyle?: Type;
|
|
14
|
-
}
|
|
15
|
-
export declare const TabStyle: import("styled-components").StyledComponent<"li", {
|
|
16
|
-
base: {
|
|
17
|
-
baseHeight: {
|
|
18
|
-
value: number;
|
|
19
|
-
unit: string;
|
|
20
|
-
};
|
|
21
|
-
baseWidth: {
|
|
22
|
-
value: number;
|
|
23
|
-
unit: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
27
|
-
color: {
|
|
28
|
-
default: {
|
|
29
|
-
pink: string;
|
|
30
|
-
plum: string;
|
|
31
|
-
white: string;
|
|
32
|
-
black: string;
|
|
33
|
-
};
|
|
34
|
-
accent: {
|
|
35
|
-
lemon: string;
|
|
36
|
-
sky: string;
|
|
37
|
-
orange: string;
|
|
38
|
-
};
|
|
39
|
-
hover: {
|
|
40
|
-
pink: string;
|
|
41
|
-
};
|
|
42
|
-
text: {
|
|
43
|
-
gray: string;
|
|
44
|
-
pink: string;
|
|
45
|
-
plum: string;
|
|
46
|
-
white: string;
|
|
47
|
-
black: string;
|
|
48
|
-
};
|
|
49
|
-
line: {
|
|
50
|
-
L01: string;
|
|
51
|
-
L02: string;
|
|
52
|
-
L03: string;
|
|
53
|
-
L04: string;
|
|
54
|
-
};
|
|
55
|
-
notification: {
|
|
56
|
-
info: string;
|
|
57
|
-
success: string;
|
|
58
|
-
warning: string;
|
|
59
|
-
error: string;
|
|
60
|
-
};
|
|
61
|
-
background: {
|
|
62
|
-
sand: {
|
|
63
|
-
default: string;
|
|
64
|
-
E01: string;
|
|
65
|
-
E02: string;
|
|
66
|
-
};
|
|
67
|
-
pink: {
|
|
68
|
-
default: string;
|
|
69
|
-
E01: string;
|
|
70
|
-
E02: string;
|
|
71
|
-
};
|
|
72
|
-
plum: {
|
|
73
|
-
default: string;
|
|
74
|
-
E01: string;
|
|
75
|
-
E02: string;
|
|
76
|
-
};
|
|
77
|
-
lemon: {
|
|
78
|
-
default: string;
|
|
79
|
-
E01: string;
|
|
80
|
-
E02: string;
|
|
81
|
-
};
|
|
82
|
-
sky: {
|
|
83
|
-
default: string;
|
|
84
|
-
E01: string;
|
|
85
|
-
E02: string;
|
|
86
|
-
};
|
|
87
|
-
orange: {
|
|
88
|
-
default: string;
|
|
89
|
-
E01: string;
|
|
90
|
-
E02: string;
|
|
91
|
-
};
|
|
92
|
-
white: {
|
|
93
|
-
default: string;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
focus: {
|
|
97
|
-
dark: string;
|
|
98
|
-
light: string;
|
|
99
|
-
};
|
|
100
|
-
transparency: {
|
|
101
|
-
T0: string;
|
|
102
|
-
T10: string;
|
|
103
|
-
T20: string;
|
|
104
|
-
T30: string;
|
|
105
|
-
T40: string;
|
|
106
|
-
T50: string;
|
|
107
|
-
T60: string;
|
|
108
|
-
T70: string;
|
|
109
|
-
T80: string;
|
|
110
|
-
T90: string;
|
|
111
|
-
T100: string;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
fontFamily: {
|
|
115
|
-
default: string;
|
|
116
|
-
heading: string;
|
|
117
|
-
numerals: string;
|
|
118
|
-
};
|
|
119
|
-
fontSize: {
|
|
120
|
-
default: string;
|
|
121
|
-
xl: string;
|
|
122
|
-
l: string;
|
|
123
|
-
s: string;
|
|
124
|
-
xs: string;
|
|
125
|
-
h1XL: string;
|
|
126
|
-
h1L: string;
|
|
127
|
-
h1M: string;
|
|
128
|
-
h1S: string;
|
|
129
|
-
h2M: string;
|
|
130
|
-
h2S: string;
|
|
131
|
-
h3: string;
|
|
132
|
-
h4: string;
|
|
133
|
-
h5: string;
|
|
134
|
-
h1: string;
|
|
135
|
-
h2: string;
|
|
136
|
-
};
|
|
137
|
-
fontWeight: {
|
|
138
|
-
book: number;
|
|
139
|
-
medium: number;
|
|
140
|
-
bold: number;
|
|
141
|
-
black: number;
|
|
142
|
-
};
|
|
143
|
-
form: {
|
|
144
|
-
smallSelectWidth: string;
|
|
145
|
-
smallSelectHeight: string;
|
|
146
|
-
};
|
|
147
|
-
grid: {
|
|
148
|
-
gutter: string;
|
|
149
|
-
};
|
|
150
|
-
lineHeight: {
|
|
151
|
-
default: string;
|
|
152
|
-
xl: string;
|
|
153
|
-
s: string;
|
|
154
|
-
xs: string;
|
|
155
|
-
xxs: string;
|
|
156
|
-
auto: string;
|
|
157
|
-
h1XL: string;
|
|
158
|
-
h1L: string;
|
|
159
|
-
h1M: string;
|
|
160
|
-
h1S: string;
|
|
161
|
-
h2M: string;
|
|
162
|
-
h2S: string;
|
|
163
|
-
h3: string;
|
|
164
|
-
h4: string;
|
|
165
|
-
h5: string;
|
|
166
|
-
h1: string;
|
|
167
|
-
h2: string;
|
|
168
|
-
};
|
|
169
|
-
media: Record<string | number, (l: TemplateStringsArray, ...p: (string | number)[]) => string>;
|
|
170
|
-
radius: {
|
|
171
|
-
default: string;
|
|
172
|
-
s: string;
|
|
173
|
-
xs: string;
|
|
174
|
-
circle: string;
|
|
175
|
-
pill: string;
|
|
176
|
-
};
|
|
177
|
-
}, TabStyleProps, never>;
|
|
178
|
-
declare class Tab extends PureComponent<TabProps> {
|
|
179
|
-
onClick: () => void;
|
|
180
|
-
render(): React.JSX.Element;
|
|
181
|
-
}
|
|
182
|
-
export default Tab;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React__default, { PureComponent } from 'react';
|
|
2
|
-
import styled from '../../themes/styled.js';
|
|
3
|
-
import theme from '../../themes/theme.js';
|
|
4
|
-
import { getMultipliedSize } from '../../utils/styledUtils.js';
|
|
5
|
-
|
|
6
|
-
const TabStyle = styled.li `
|
|
7
|
-
display: inline-block;
|
|
8
|
-
list-style: none;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
padding: ${getMultipliedSize(theme.base.baseHeight, 0.8)}
|
|
11
|
-
${getMultipliedSize(theme.base.baseHeight, 1.6)};
|
|
12
|
-
color: ${theme.color.text.black};
|
|
13
|
-
font-size: ${theme.fontSize.default};
|
|
14
|
-
line-height: ${theme.lineHeight.default};
|
|
15
|
-
font-weight: ${theme.fontWeight.book};
|
|
16
|
-
margin-right: ${getMultipliedSize(theme.base.baseHeight, 2)};
|
|
17
|
-
|
|
18
|
-
&:last-child {
|
|
19
|
-
margin-right: 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
${({ isActive }) => isActive &&
|
|
23
|
-
`
|
|
24
|
-
color: ${theme.color.text.pink};
|
|
25
|
-
background-color: ${theme.color.background.sand.E01};
|
|
26
|
-
`}
|
|
27
|
-
|
|
28
|
-
/* Underlined style modifications (legacy) */
|
|
29
|
-
${({ tabStyle }) => tabStyle === 'underlined' &&
|
|
30
|
-
`
|
|
31
|
-
padding: ${getMultipliedSize(theme.base.baseHeight, 1.6)} 0;
|
|
32
|
-
margin-right: ${getMultipliedSize(theme.base.baseHeight, 3)};
|
|
33
|
-
`}
|
|
34
|
-
|
|
35
|
-
${({ isActive, tabStyle }) => isActive &&
|
|
36
|
-
tabStyle === 'underlined' &&
|
|
37
|
-
`
|
|
38
|
-
border-bottom: 2px solid ${theme.color.default.pink};
|
|
39
|
-
background-color: transparent;
|
|
40
|
-
`}
|
|
41
|
-
`;
|
|
42
|
-
class Tab extends PureComponent {
|
|
43
|
-
constructor() {
|
|
44
|
-
super(...arguments);
|
|
45
|
-
this.onClick = () => {
|
|
46
|
-
const { label, onClick } = this.props;
|
|
47
|
-
if (onClick) {
|
|
48
|
-
onClick(label);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
render() {
|
|
53
|
-
const { onClick, props: { activeTab, label, tabStyle }, } = this;
|
|
54
|
-
return (React__default.createElement(TabStyle, { role: "tab", "aria-selected": activeTab === label, isActive: activeTab === label, tabStyle: tabStyle, onClick: onClick }, label));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export { TabStyle, Tab as default };
|