math-main-components 0.0.154 → 0.0.155

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.
@@ -1,3 +1,8 @@
1
- import React from 'react';
2
- import { SvgIconProps } from "./SvgIcon.types";
3
- export declare function SvgIcon({ iconName, size, className, onClick }: SvgIconProps): React.JSX.Element;
1
+ import React, { MouseEvent } from 'react';
2
+ export declare function SvgIcon({ id, iconName, size, onClick }: {
3
+ id?: string;
4
+ iconName?: string;
5
+ size?: string;
6
+ fill?: string;
7
+ onClick?: (event: MouseEvent<HTMLSpanElement>) => void;
8
+ }): React.JSX.Element;
package/dist/index.cjs.js CHANGED
@@ -8,9 +8,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
8
8
 
9
9
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
10
 
11
- function SvgIcon({ iconName, size = "24px", className = "", onClick }) {
12
- return (React__default["default"].createElement(React__default["default"].Fragment, null,
13
- React__default["default"].createElement("span", { onClick: onClick, className: `material-symbols-outlined ${className}`, style: { fontSize: size } }, iconName)));
11
+ function SvgIcon({ id, iconName, size = "24px", onClick }) {
12
+ return (React__default["default"].createElement("span", { onClick: onClick, className: "material-symbols-outlined", id: id, style: { fontSize: size } }, iconName));
14
13
  }
15
14
 
16
15
  function styleInject(css, ref) {
@@ -483,7 +482,7 @@ function RadioButtons({ options, group, selected, onClick, width = "100%" }) {
483
482
  :
484
483
  React__default["default"].createElement("input", { type: "radio", id: option.name, name: group, value: option.name, onInput: onUpdateSelected }),
485
484
  React__default["default"].createElement("label", { htmlFor: option.name }, option.text),
486
- React__default["default"].createElement(SvgIcon, { iconName: "done", size: "20px", className: styles$9.icon })))));
485
+ React__default["default"].createElement(SvgIcon, { iconName: "done", size: "20px" })))));
487
486
  }
488
487
 
489
488
  var css_248z$8 = ".styles-module_container__RhsQe {\n margin-right: 8px;\n}\n.styles-module_container__RhsQe .styles-module_button__HuX-0 {\n background: none;\n padding: none;\n border: none;\n width: 40px;\n height: 40px;\n transition: 0.2s;\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 20px;\n}\n.styles-module_container__RhsQe .styles-module_button__HuX-0 span {\n color: var(--foreground-1);\n}\n.styles-module_container__RhsQe .styles-module_button__HuX-0:hover {\n background: var(--background-1);\n}\n.styles-module_container__RhsQe.styles-module_middle__xg7RF .styles-module_button__HuX-0 {\n flex-direction: row;\n gap: 5px;\n}\n.styles-module_container__RhsQe.styles-module_middle__xg7RF .styles-module_button__HuX-0:hover {\n background: none;\n}";
package/dist/index.esm.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import React, { useState, useCallback, useRef, createRef, useEffect } from 'react';
2
2
 
3
- function SvgIcon({ iconName, size = "24px", className = "", onClick }) {
4
- return (React.createElement(React.Fragment, null,
5
- React.createElement("span", { onClick: onClick, className: `material-symbols-outlined ${className}`, style: { fontSize: size } }, iconName)));
3
+ function SvgIcon({ id, iconName, size = "24px", onClick }) {
4
+ return (React.createElement("span", { onClick: onClick, className: "material-symbols-outlined", id: id, style: { fontSize: size } }, iconName));
6
5
  }
7
6
 
8
7
  function styleInject(css, ref) {
@@ -475,7 +474,7 @@ function RadioButtons({ options, group, selected, onClick, width = "100%" }) {
475
474
  :
476
475
  React.createElement("input", { type: "radio", id: option.name, name: group, value: option.name, onInput: onUpdateSelected }),
477
476
  React.createElement("label", { htmlFor: option.name }, option.text),
478
- React.createElement(SvgIcon, { iconName: "done", size: "20px", className: styles$9.icon })))));
477
+ React.createElement(SvgIcon, { iconName: "done", size: "20px" })))));
479
478
  }
480
479
 
481
480
  var css_248z$8 = ".styles-module_container__RhsQe {\n margin-right: 8px;\n}\n.styles-module_container__RhsQe .styles-module_button__HuX-0 {\n background: none;\n padding: none;\n border: none;\n width: 40px;\n height: 40px;\n transition: 0.2s;\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 20px;\n}\n.styles-module_container__RhsQe .styles-module_button__HuX-0 span {\n color: var(--foreground-1);\n}\n.styles-module_container__RhsQe .styles-module_button__HuX-0:hover {\n background: var(--background-1);\n}\n.styles-module_container__RhsQe.styles-module_middle__xg7RF .styles-module_button__HuX-0 {\n flex-direction: row;\n gap: 5px;\n}\n.styles-module_container__RhsQe.styles-module_middle__xg7RF .styles-module_button__HuX-0:hover {\n background: none;\n}";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-main-components",
3
- "version": "0.0.154",
3
+ "version": "0.0.155",
4
4
  "author": "Emilian Scheel",
5
5
  "files": [
6
6
  "dist/**/*"