UNPKG

@opalkelly/frontpanel-react-components

Version:

React Component Library for OpalKelly FrontPanel application development

68 lines (57 loc) 1.64 kB
/** * Copyright (c) 2024 Opal Kelly Incorporated * * This source code is licensed under the FrontPanel license. * See the LICENSE file found in the root directory of this project. */ .okToggle { /* Layout */ display: inline-flex; padding: var(--toggle-padding, 6px 12px); justify-content: center; align-items: center; gap: 4px; color: var(--base-white, #fff); /* Style */ border-width: 0px; border-radius: 4px; background: var(--brand-12, #44bd84); /* Typography */ color: var(--Base-White, #fff); text-align: center; font-family: Inter, "Nunito Sans", sans-serif, ui-sans-serif; font-size: var(--toggle-font-size, 12px); font-style: normal; font-weight: 600; line-height: 12px; /* 100% */ /* Size 1 */ &:where(.ok-r-size-1) { --toggle-padding: 6px 12px; --toggle-font-size: 12px; --toggle-line-height: 12px; } /* Size 2 */ &:where(.ok-r-size-2) { --toggle-padding: 10px 18px; --toggle-font-size: 14px; --toggle-line-height: 14px; } /* Size 3 */ &:where(.ok-r-size-3) { --toggle-padding: 18px 22px; --toggle-font-size: 20px; --toggle-line-height: 20px; } } /* State Disabled */ .okToggle[data-disabled="true"] { background: var(--Gray-2, #d0d7df); } /* State On */ .okToggle[data-state="on"]:not([data-disabled="true"]) { background: #329466; } /* State Off */ .okToggle[data-state="off"]:not([data-disabled="true"]) { background: var(--brand-12, #44bd84); }