Socket
Socket
Sign inDemoInstall

@mdxeditor/editor

Package Overview
Dependencies
Maintainers
1
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mdxeditor/editor - npm Package Compare versions

Comparing version 2.7.1 to 2.8.0

30

dist/plugins/toolbar/components/ListsToggle.js

@@ -6,17 +6,21 @@ import React__default from "react";

import { iconComponentFor$ } from "../../core/index.js";
const ListsToggle = () => {
const LIST_TITLE_MAP = {
bullet: "Bulleted list",
number: "Numbered list",
check: "Check list"
};
const ICON_NAME_MAP = {
bullet: "format_list_bulleted",
number: "format_list_numbered",
check: "format_list_checked"
};
const ListsToggle = ({ options = ["bullet", "number", "check"] }) => {
const [currentListType, iconComponentFor] = useCellValues(currentListType$, iconComponentFor$);
const applyListType = usePublisher(applyListType$);
return /* @__PURE__ */ React__default.createElement(
SingleChoiceToggleGroup,
{
value: currentListType || "",
items: [
{ title: "Bulleted list", contents: iconComponentFor("format_list_bulleted"), value: "bullet" },
{ title: "Numbered list", contents: iconComponentFor("format_list_numbered"), value: "number" },
{ title: "Check list", contents: iconComponentFor("format_list_checked"), value: "check" }
],
onChange: applyListType
}
);
const items = options.map((type) => ({
value: type,
title: LIST_TITLE_MAP[type],
contents: iconComponentFor(ICON_NAME_MAP[type])
}));
return /* @__PURE__ */ React__default.createElement(SingleChoiceToggleGroup, { value: currentListType || "", items, onChange: applyListType });
};

@@ -23,0 +27,0 @@ export {

@@ -14,3 +14,3 @@ {

"type": "module",
"version": "2.7.1",
"version": "2.8.0",
"description": "React component for rich text markdown editing",

@@ -17,0 +17,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc