chore(react/ribbon): display current note type

This commit is contained in:
Elian Doran
2025-08-21 20:38:19 +03:00
parent cabeb13adb
commit c0beab8a5d
4 changed files with 70 additions and 55 deletions

View File

@@ -14,9 +14,10 @@ interface DropdownProps {
dropdownContainerClassName?: string;
hideToggleArrow?: boolean;
disabled?: boolean;
text?: ComponentChildren;
}
export default function Dropdown({ className, buttonClassName, isStatic, children, title, dropdownContainerStyle, dropdownContainerClassName, hideToggleArrow, disabled }: DropdownProps) {
export default function Dropdown({ className, buttonClassName, isStatic, children, title, text, dropdownContainerStyle, dropdownContainerClassName, hideToggleArrow, disabled }: DropdownProps) {
const dropdownRef = useRef<HTMLDivElement | null>(null);
const triggerRef = useRef<HTMLButtonElement | null>(null);
@@ -56,7 +57,7 @@ export default function Dropdown({ className, buttonClassName, isStatic, childre
return (
<div ref={dropdownRef} class={`dropdown ${className ?? ""}`} style={{ display: "flex" }}>
<button
className={`btn ${buttonClassName ?? ""} ${!hideToggleArrow ? "dropdown-toggle" : ""}`}
className={`btn select-button ${buttonClassName ?? ""} ${!hideToggleArrow ? "dropdown-toggle" : ""}`}
ref={triggerRef}
type="button"
data-bs-toggle="dropdown"
@@ -66,7 +67,10 @@ export default function Dropdown({ className, buttonClassName, isStatic, childre
title={title}
id={ariaId}
disabled={disabled}
/>
>
{text}
<span className="caret"></span>
</button>
<div
class={`dropdown-menu ${isStatic ? "static" : ""} ${dropdownContainerClassName ?? ""} tn-dropdown-list`}