@teamturing/react-kit 2.19.30 → 2.19.31
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/dist/core/Flash/index.d.ts +4 -3
- package/dist/index.js +17 -2
- package/esm/core/Flash/index.js +18 -3
- package/package.json +2 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { ComponentType, PropsWithChildren, SVGProps } from 'react';
|
|
2
2
|
import { SxProp } from '../../utils/styled-system';
|
|
3
|
-
type FlashVariantType = 'danger';
|
|
3
|
+
type FlashVariantType = 'neutral' | 'danger';
|
|
4
4
|
type Props = {
|
|
5
5
|
variant?: FlashVariantType;
|
|
6
|
+
icon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
6
7
|
} & SxProp;
|
|
7
|
-
declare const Flash: ({ variant, children, ...props }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const Flash: ({ variant, icon: Icon, children, ...props }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export default Flash;
|
|
9
10
|
export type { Props as FlashProps };
|
package/dist/index.js
CHANGED
|
@@ -19245,14 +19245,15 @@ const BaseEmptyState = styled__default.default.div`
|
|
|
19245
19245
|
`;
|
|
19246
19246
|
|
|
19247
19247
|
const Flash = ({
|
|
19248
|
-
variant = '
|
|
19248
|
+
variant = 'neutral',
|
|
19249
|
+
icon: Icon = SvgInfoInCircle,
|
|
19249
19250
|
children,
|
|
19250
19251
|
...props
|
|
19251
19252
|
}) => {
|
|
19252
19253
|
return /*#__PURE__*/jsxRuntimeExports.jsxs(BaseFlash, {
|
|
19253
19254
|
variant: variant,
|
|
19254
19255
|
...props,
|
|
19255
|
-
children: [
|
|
19256
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(Icon, {}), children]
|
|
19256
19257
|
});
|
|
19257
19258
|
};
|
|
19258
19259
|
const BaseFlash = styled__default.default.div`
|
|
@@ -19271,6 +19272,20 @@ const BaseFlash = styled__default.default.div`
|
|
|
19271
19272
|
${variant({
|
|
19272
19273
|
prop: 'variant',
|
|
19273
19274
|
variants: {
|
|
19275
|
+
neutral: {
|
|
19276
|
+
'display': 'flex',
|
|
19277
|
+
'flexDirection': 'row',
|
|
19278
|
+
'alignItems': 'center',
|
|
19279
|
+
'padding': 4,
|
|
19280
|
+
'fontSize': 'xs',
|
|
19281
|
+
'fontWeight': 'medium',
|
|
19282
|
+
'lineHeight': 2,
|
|
19283
|
+
'color': 'text/neutral',
|
|
19284
|
+
'backgroundColor': 'bg/neutral',
|
|
19285
|
+
'& > svg': {
|
|
19286
|
+
color: 'icon/neutral/bold'
|
|
19287
|
+
}
|
|
19288
|
+
},
|
|
19274
19289
|
danger: {
|
|
19275
19290
|
'display': 'flex',
|
|
19276
19291
|
'flexDirection': 'row',
|
package/esm/core/Flash/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import
|
|
2
|
+
import SvgInfoInCircle from '../../packages/icons/esm/InfoInCircle.js';
|
|
3
3
|
import { forcePixelValue } from '../../packages/utils/esm/forcePixelValue.js';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import '../../node_modules/styled-system/dist/index.esm.js';
|
|
@@ -8,14 +8,15 @@ import { j as jsxRuntimeExports } from '../../node_modules/react/jsx-runtime.js'
|
|
|
8
8
|
import { variant } from '../../node_modules/@styled-system/variant/dist/index.esm.js';
|
|
9
9
|
|
|
10
10
|
const Flash = ({
|
|
11
|
-
variant = '
|
|
11
|
+
variant = 'neutral',
|
|
12
|
+
icon: Icon = SvgInfoInCircle,
|
|
12
13
|
children,
|
|
13
14
|
...props
|
|
14
15
|
}) => {
|
|
15
16
|
return /*#__PURE__*/jsxRuntimeExports.jsxs(BaseFlash, {
|
|
16
17
|
variant: variant,
|
|
17
18
|
...props,
|
|
18
|
-
children: [
|
|
19
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(Icon, {}), children]
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
22
|
const BaseFlash = styled.div`
|
|
@@ -34,6 +35,20 @@ const BaseFlash = styled.div`
|
|
|
34
35
|
${variant({
|
|
35
36
|
prop: 'variant',
|
|
36
37
|
variants: {
|
|
38
|
+
neutral: {
|
|
39
|
+
'display': 'flex',
|
|
40
|
+
'flexDirection': 'row',
|
|
41
|
+
'alignItems': 'center',
|
|
42
|
+
'padding': 4,
|
|
43
|
+
'fontSize': 'xs',
|
|
44
|
+
'fontWeight': 'medium',
|
|
45
|
+
'lineHeight': 2,
|
|
46
|
+
'color': 'text/neutral',
|
|
47
|
+
'backgroundColor': 'bg/neutral',
|
|
48
|
+
'& > svg': {
|
|
49
|
+
color: 'icon/neutral/bold'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
37
52
|
danger: {
|
|
38
53
|
'display': 'flex',
|
|
39
54
|
'flexDirection': 'row',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.31",
|
|
4
4
|
"description": "React components, hooks for create teamturing web application",
|
|
5
5
|
"author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
|
|
6
6
|
"homepage": "https://github.com/weareteamturing/bombe#readme",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"react-textarea-autosize": "^8.5.3",
|
|
66
66
|
"styled-system": "^5.1.5"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "fafd0ad315a50e2779a033af6f92420eb9b49a0f"
|
|
69
69
|
}
|