@visns-studio/visns-components 1.6.10 → 1.6.11

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.
@@ -736,6 +736,42 @@ const DataGrid = forwardRef(
736
736
  }
737
737
  },
738
738
  };
739
+ case "colour":
740
+ return {
741
+ ...commonProps,
742
+ name: `${column.type}.${column.id}`,
743
+ sortable: false,
744
+ render: ({ data }) => {
745
+ if (data && data[column.id]) {
746
+ return (
747
+ <div
748
+ style={{
749
+ width: "25px",
750
+ height: "25px",
751
+ borderRadius: "10px",
752
+ overflow: "hidden",
753
+ }}
754
+ >
755
+ <div
756
+ style={{
757
+ background:
758
+ data[column.id] +
759
+ " none repeat scroll 0% 0%",
760
+ height: "100%",
761
+ width: "100%",
762
+ cursor: "pointer",
763
+ position: "relative",
764
+ outline:
765
+ "currentcolor none medium",
766
+ }}
767
+ ></div>
768
+ </div>
769
+ );
770
+ } else {
771
+ return null;
772
+ }
773
+ },
774
+ };
739
775
  case "created_by":
740
776
  return {
741
777
  ...commonProps,
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
 
3
- function Select(props) {
3
+ const Select = (props) => {
4
4
  const { className, dataOptions, inputValue, onChange, options, settings } =
5
5
  props;
6
6
 
@@ -24,6 +24,6 @@ function Select(props) {
24
24
  ))}
25
25
  </select>
26
26
  );
27
- }
27
+ };
28
28
 
29
29
  export default Select;
package/package.json CHANGED
@@ -34,7 +34,7 @@
34
34
  "react-dom": "^17.0.1"
35
35
  },
36
36
  "name": "@visns-studio/visns-components",
37
- "version": "1.6.10",
37
+ "version": "1.6.11",
38
38
  "description": "Various packages to assist in the development of our Custom Applications.",
39
39
  "main": "index.js",
40
40
  "devDependencies": {},