@mdxeditor/editor 3.4.2 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts
CHANGED
|
@@ -283,6 +283,10 @@ export declare const BlockTypeSelect: () => default_2.JSX.Element | null;
|
|
|
283
283
|
*/
|
|
284
284
|
export declare const BoldItalicUnderlineToggles: default_2.FC;
|
|
285
285
|
|
|
286
|
+
export declare interface BoldItalicUnderlineTogglesProps {
|
|
287
|
+
options?: ('Bold' | 'Italic' | 'Underline')[];
|
|
288
|
+
}
|
|
289
|
+
|
|
286
290
|
/**
|
|
287
291
|
* A toolbar button primitive.
|
|
288
292
|
* @group Toolbar Primitives
|
|
@@ -20,9 +20,9 @@ const FormatButton = ({ format, addTitle, removeTitle, icon, formatName }) => {
|
|
|
20
20
|
iconComponentFor(icon)
|
|
21
21
|
);
|
|
22
22
|
};
|
|
23
|
-
const BoldItalicUnderlineToggles = () => {
|
|
23
|
+
const BoldItalicUnderlineToggles = ({ options }) => {
|
|
24
24
|
const t = useTranslation();
|
|
25
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: styles.toolbarGroupOfGroups }, /* @__PURE__ */ React__default.createElement(
|
|
25
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: styles.toolbarGroupOfGroups }, !options || options.includes("Bold") && /* @__PURE__ */ React__default.createElement(
|
|
26
26
|
FormatButton,
|
|
27
27
|
{
|
|
28
28
|
format: IS_BOLD,
|
|
@@ -31,7 +31,7 @@ const BoldItalicUnderlineToggles = () => {
|
|
|
31
31
|
icon: "format_bold",
|
|
32
32
|
formatName: "bold"
|
|
33
33
|
}
|
|
34
|
-
), /* @__PURE__ */ React__default.createElement(
|
|
34
|
+
), !options || options.includes("Italic") && /* @__PURE__ */ React__default.createElement(
|
|
35
35
|
FormatButton,
|
|
36
36
|
{
|
|
37
37
|
format: IS_ITALIC,
|
|
@@ -40,7 +40,7 @@ const BoldItalicUnderlineToggles = () => {
|
|
|
40
40
|
icon: "format_italic",
|
|
41
41
|
formatName: "italic"
|
|
42
42
|
}
|
|
43
|
-
), /* @__PURE__ */ React__default.createElement(
|
|
43
|
+
), !options || options.includes("Underline") && /* @__PURE__ */ React__default.createElement(
|
|
44
44
|
FormatButton,
|
|
45
45
|
{
|
|
46
46
|
format: IS_UNDERLINE,
|