aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FontIconBox
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-03-06 16:17:47 -0500
committerbobzel <zzzman@gmail.com>2025-03-06 16:17:47 -0500
commit5ad858090f3006631062877d90120e3cc505fada (patch)
tree9f87a8e1e7098a1025f6f4aac332dbc854db5be3 /src/client/views/nodes/FontIconBox
parent9c2a7c14fd9d0e44609aab30c6323583162009db (diff)
parentadaa107aac8558fa6f46e6ba1263c650c212d506 (diff)
Merge branch 'master' into aarav_edit
Diffstat (limited to 'src/client/views/nodes/FontIconBox')
-rw-r--r--src/client/views/nodes/FontIconBox/FontIconBox.scss36
-rw-r--r--src/client/views/nodes/FontIconBox/FontIconBox.tsx7
2 files changed, 22 insertions, 21 deletions
diff --git a/src/client/views/nodes/FontIconBox/FontIconBox.scss b/src/client/views/nodes/FontIconBox/FontIconBox.scss
index 2405889cf..186d24e92 100644
--- a/src/client/views/nodes/FontIconBox/FontIconBox.scss
+++ b/src/client/views/nodes/FontIconBox/FontIconBox.scss
@@ -1,4 +1,4 @@
-@import '../../global/globalCssVariables.module.scss';
+@use '../../global/globalCssVariables.module.scss' as global;
// bcz: something's messed up with the IconButton css. this mostly fixes the fit-all button, the color buttons, the undo +/- expander and the dropdown doc type list (eg 'text')
.iconButton-container {
@@ -23,7 +23,7 @@
justify-content: center;
align-items: center;
font-size: 80%;
- border-radius: $standard-border-radius;
+ border-radius: global.$standard-border-radius;
transition: 0.15s;
.menuButton-wrap {
@@ -34,7 +34,7 @@
}
.fontIconBox-label {
- color: $white;
+ color: global.$white;
bottom: -1;
position: absolute;
text-align: center;
@@ -124,17 +124,17 @@
width: 21px;
left: 2px;
bottom: 2px;
- background-color: $white;
+ background-color: global.$white;
-webkit-transition: 0.4s;
transition: 0.4s;
}
input:checked + .slider {
- background-color: $medium-blue;
+ background-color: global.$medium-blue;
}
input:focus + .slider {
- box-shadow: 0 0 1px $medium-blue;
+ box-shadow: 0 0 1px global.$medium-blue;
}
input:checked + .slider:before {
@@ -145,11 +145,11 @@
/* Rounded sliders */
.slider.round {
- border-radius: $standard-border-radius;
+ border-radius: global.$standard-border-radius;
}
.slider.round:before {
- border-radius: $standard-border-radius;
+ border-radius: global.$standard-border-radius;
}
}
@@ -259,12 +259,12 @@
height: fit-content;
top: 100%;
z-index: 21;
- background-color: $white;
+ background-color: global.$white;
box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.3);
padding: 1px;
.list-item {
- color: $black;
+ color: global.$black;
width: 100%;
height: 25px;
font-weight: 400;
@@ -285,7 +285,7 @@
background: transparent;
&.slider {
- color: $white;
+ color: global.$white;
cursor: pointer;
flex-direction: column;
background: transparent;
@@ -302,7 +302,7 @@
z-index: 21;
background-color: #e3e3e3;
box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.3);
- border-radius: $standard-border-radius;
+ border-radius: global.$standard-border-radius;
.menu-slider {
height: 10px;
@@ -340,7 +340,7 @@
border: none;
text-align: right;
width: 100%;
- color: $white;
+ color: global.$white;
height: 100%;
text-align: center;
}
@@ -354,7 +354,7 @@
&.list {
width: 100%;
justify-content: space-around;
- border: $standard-border;
+ border: global.$standard-border;
.menuButton-dropdownList {
position: absolute;
@@ -365,12 +365,12 @@
overflow-y: scroll;
top: 100%;
z-index: 21;
- background-color: $white;
+ background-color: global.$white;
box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.3);
padding: 1px;
.list-item {
- color: $black;
+ color: global.$black;
width: 100%;
height: 25px;
font-weight: 400;
@@ -394,7 +394,7 @@
padding-left: 10px;
justify-content: flex-start;
color: black;
- background-color: $light-gray;
+ background-color: global.$light-gray;
padding: 5px;
padding-left: 10px;
width: 100%;
@@ -417,7 +417,7 @@
top: 100%;
background-color: #e3e3e3;
box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.3);
- border-radius: $standard-border-radius;
+ border-radius: global.$standard-border-radius;
}
}
diff --git a/src/client/views/nodes/FontIconBox/FontIconBox.tsx b/src/client/views/nodes/FontIconBox/FontIconBox.tsx
index f58862028..7e0236b74 100644
--- a/src/client/views/nodes/FontIconBox/FontIconBox.tsx
+++ b/src/client/views/nodes/FontIconBox/FontIconBox.tsx
@@ -1,11 +1,13 @@
+import { Button, ColorPicker, Dropdown, DropdownType, IconButton, IListItemProps, MultiToggle, NumberDropdown, NumberDropdownType, Popup, Size, Toggle, ToggleType, Type } from '@dash/components';
import { IconProp } from '@fortawesome/fontawesome-svg-core';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { Button, ColorPicker, Dropdown, DropdownType, IconButton, IListItemProps, MultiToggle, NumberDropdown, NumberDropdownType, Popup, Size, Toggle, ToggleType, Type } from '@dash/components';
import { action, computed, makeObservable, observable } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
import { ClientUtils, DashColor, returnFalse, returnTrue, setupMoveUpEvents } from '../../../../ClientUtils';
import { Doc, DocListCast, StrListCast } from '../../../../fields/Doc';
+import { InkTool } from '../../../../fields/InkField';
+import { ScriptField } from '../../../../fields/ScriptField';
import { BoolCast, DocCast, NumCast, ScriptCast, StrCast } from '../../../../fields/Types';
import { emptyFunction } from '../../../../Utils';
import { Docs } from '../../../documents/Documents';
@@ -21,8 +23,6 @@ import { FieldView, FieldViewProps } from '../FieldView';
import { OpenWhere } from '../OpenWhere';
import './FontIconBox.scss';
import TrailsIcon from './TrailsIcon';
-import { InkTool } from '../../../../fields/InkField';
-import { ScriptField } from '../../../../fields/ScriptField';
export enum ButtonType {
TextButton = 'textBtn',
@@ -134,6 +134,7 @@ export class FontIconBox extends ViewBoxBaseComponent<ButtonProps>() {
min={NumCast(this.dataDoc.numBtnMin, 0)}
max={NumCast(this.dataDoc.numBtnMax, 100)}
number={checkResult}
+ size={Size.XSMALL}
setNumber={undoable(value => numScript(value), `${this.Document.title} button set from list`)}
fillWidth
/>