dce-reactkit 3.7.25 → 3.7.27
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/cjs/index.js +4 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Drawer.d.ts +1 -0
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Drawer.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/Drawer.tsx +8 -1
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -12,6 +12,8 @@ import React from 'react';
|
|
|
12
12
|
|
|
13
13
|
// Props definition
|
|
14
14
|
type Props = {
|
|
15
|
+
// If true, the background color is gray
|
|
16
|
+
grayBackground?: boolean,
|
|
15
17
|
// Custom background color
|
|
16
18
|
customBackgroundColor?: string,
|
|
17
19
|
// Children to display
|
|
@@ -51,6 +53,7 @@ const Drawer: React.FC<Props> = (props) => {
|
|
|
51
53
|
|
|
52
54
|
// Destructure all props
|
|
53
55
|
const {
|
|
56
|
+
grayBackground,
|
|
54
57
|
customBackgroundColor,
|
|
55
58
|
children,
|
|
56
59
|
} = props;
|
|
@@ -67,7 +70,11 @@ const Drawer: React.FC<Props> = (props) => {
|
|
|
67
70
|
<div
|
|
68
71
|
className="Drawer-container"
|
|
69
72
|
style={{
|
|
70
|
-
backgroundColor: (
|
|
73
|
+
backgroundColor: (
|
|
74
|
+
grayBackground
|
|
75
|
+
? '#E2E3E5'
|
|
76
|
+
: (customBackgroundColor ?? undefined)
|
|
77
|
+
),
|
|
71
78
|
}}
|
|
72
79
|
>
|
|
73
80
|
<style>{style}</style>
|