Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"@kne/create-deferred": "^0.1.0",
"@kne/ensure-slash": "^0.1.0",
"@kne/flex-box": "^0.1.1",
"@kne/form-info": "^0.1.7",
"@kne/form-info": "^0.1.9",
"@kne/global-context": "^1.3.2",
"@kne/info-page": "^0.2.9",
"@kne/info-page": "^0.2.10",
"@kne/is-empty": "^1.0.1",
"@kne/phone-number-input": "^0.1.5",
"@kne/react-enum": "^0.1.14",
Expand Down
21 changes: 13 additions & 8 deletions src/components/Global/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import "./polyfill";
import "simplebar/dist/simplebar.min.css";
import "./override.scss";
import classnames from "classnames";
import {
Global as GlobalContext, useGlobalContext as useContext, usePreset, GlobalValue, useGlobalValue, GlobalSetting
Expand All @@ -24,13 +23,19 @@ import Color from "color";
import {createWithRemoteLoader} from "@kne/remote-loader";
import isEqual from './isEqual';

document.body.classList.add(style["container"]);
if (!isMobile() && !window.__COMPONENTS_CORE_SIMPLE_BAR_DISABLED) {
new SimpleBar(document.body);
getScrollEl().classList.add(style["container"]);
} else {
document.body.classList.add("simplebar-content-wrapper");
}
(() => {
if (window.__COMPONENTS_CORE_IN_SDK) {
return;
}
document.body.classList.add(style["container"]);
if (!isMobile() && !window.__COMPONENTS_CORE_SIMPLE_BAR_DISABLED) {
new SimpleBar(document.body);
getScrollEl().classList.add(style["container"]);
} else {
document.body.classList.add("simplebar-content-wrapper");
}
})();


export const containerClassName = style["container"]
.replace(/\+/g, "\\+")
Expand Down
43 changes: 0 additions & 43 deletions src/components/Global/override.scss

This file was deleted.

45 changes: 44 additions & 1 deletion src/components/Global/style.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,50 @@
@import "../../common/warning-color.scss";

body.container {
overflow: auto !important;
padding: 0;
margin: 0;
height: 100vh;

&::-webkit-scrollbar {
width: 0;
height: 0;
}

* {
-webkit-tap-highlight-color: transparent;
outline: none;
}
}

.container {
box-sizing: border-box;

:global {
.simplebar-scrollbar:before {
background: #666;
}

.container-body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
Helvetica Neue, Arial, Noto Sans, sans-serif, apple color emoji,
segoe ui emoji, Segoe UI Symbol, noto color emoji;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}

.ant-message {
z-index: 3010;
}

.ant-picker-dropdown .ant-picker-month-panel .ant-picker-content {
height: 200px;
}
}

&.is-not-init {
pointer-events: none;
opacity: 0.7;
Expand Down Expand Up @@ -117,7 +160,7 @@

:global(.btn-text-link) {
padding: 0;
border: none !important;
border-color: transparent !important;
background: transparent;
color: var(--primary-color);
box-shadow: none !important;
Expand Down
Loading