79 lines
2.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Парус 8 - Панели мониторинга
Вспомогательные стили Stack
*/
import { P8P_COMPONENT_CLICKABLE_OPACITY } from "./common";
//----------------
//Интерфейс модуля
//----------------
//Адаптивный с сокрытием
export const P8P_STACK_INLINE_HIDDEN = {
width: "100%",
containerType: "inline-size",
overflow: "hidden"
};
//---------
//Стили заголовка
//---------
//Контейнер текста заголовка
export const P8P_STACK_HEADER_TEXT = ({ isClickable }) => ({
height: "100%",
width: "100%",
display: "flex",
alignItems: "center",
justifyContent: "center",
padding: "0px 8px",
color: isClickable ? "P8PHeader.textLink" : "P8PHeader.text",
...(isClickable ? { ...P8P_COMPONENT_CLICKABLE_OPACITY } : {})
});
//Контейнер фильтра заголовка
export const P8P_STACK_HEADER_FILTER = ({ isClickable = false }) => ({
width: "100%",
display: "flex",
flexDirection: "column",
alignItems: "flex-start",
alignContent: "flex-start",
cursor: isClickable ? "pointer" : "default",
overflow: "hidden"
});
//Контейнер фильтра заголовка
export const P8P_STACK_HEADER_FILTER_CONTAINER = ({ isClickable = false }) => ({
height: "100%",
width: "100%",
display: "flex",
flexDirection: "row",
alignItems: "center",
gap: "4px",
paddingRight: "4px",
"&:hover": isClickable ? { opacity: 0.8 } : {}
});
//Контейнер кнопки с очисткой
export const P8P_STACK_HEADER_WITH_CLEAR = {
height: "100%",
width: "100%",
display: "flex",
flexDirection: "row",
alignItems: "center"
};
//Контейнер значений индикатора
export const P8P_STACK_HEADER_INDICATOR = ({ isClickable }) => ({
height: "100%",
width: "100%",
display: "flex",
flexDirection: "column",
alignItems: "start",
justifyContent: "center",
padding: "0px 8px",
overflow: "hidden",
...(isClickable ? { ...P8P_COMPONENT_CLICKABLE_OPACITY } : {})
});