@bigbinary/neetoui 2.0.84 → 2.0.88

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neetoui",
3
- "version": "2.0.84",
3
+ "version": "2.0.88",
4
4
  "main": "./neetoui.js",
5
5
  "author": "BigBinary",
6
6
  "license": "MIT",
@@ -82,7 +82,7 @@
82
82
  "react-toastify": "^8.0.2"
83
83
  },
84
84
  "dependencies": {
85
- "@bigbinary/neeto-icons": "^1.7.4",
85
+ "@bigbinary/neeto-icons": "^1.7.6",
86
86
  "@popperjs/core": "^2.9.2",
87
87
  "@reach/auto-id": "^0.15.0",
88
88
  "@tailwindcss/forms": "^0.3.2",
@@ -48,6 +48,15 @@ Link.args = {
48
48
  label: "Button",
49
49
  };
50
50
 
51
+ export const Tooltip = Template.bind({});
52
+ Tooltip.args = {
53
+ label: "Tooltip button",
54
+ tooltipProps: {
55
+ content: "Top",
56
+ placement: "top",
57
+ },
58
+ };
59
+
51
60
  export const AllVariants = () => {
52
61
  const [loading, setLoading] = useState(false);
53
62
  const toggle = () => {
@@ -1,6 +1,8 @@
1
- import React from "react";
1
+ import React, { useState } from "react";
2
2
  import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
3
+
3
4
  import Sidebar from "../lib/components/layouts/Sidebar";
5
+ import AppSwitcher from "../lib/components/layouts/AppSwitcher";
4
6
  import { NAV_LINKS, COMPONENT_MAPPING } from "../example/src/constants";
5
7
 
6
8
  export default {
@@ -71,4 +73,51 @@ Sidenav.args = {
71
73
  },
72
74
  ],
73
75
  },
76
+ showAppSwitcher: true,
77
+ appName: "neetoUI",
78
+ };
79
+
80
+ export const SidebarWithAppSwitcher = (args) => {
81
+ const [isAppSwitcherOpen, setIsAppSwitcherOpen] = useState(false);
82
+
83
+ return (
84
+ <Router>
85
+ <Sidebar
86
+ {...args}
87
+ onAppSwitcherToggle={() => setIsAppSwitcherOpen((isOpen) => !isOpen)}
88
+ toggleAppSwitcher={isAppSwitcherOpen}
89
+ />
90
+ <AppSwitcher
91
+ isOpen={isAppSwitcherOpen}
92
+ onClose={() => setIsAppSwitcherOpen(false)}
93
+ v2
94
+ />
95
+ </Router>
96
+ );
97
+ };
98
+
99
+ SidebarWithAppSwitcher.storyName = "Sidebar with AppSwitcher"
100
+ SidebarWithAppSwitcher.args = {
101
+ organizationInfo: {
102
+ name: "neetoUI",
103
+ subdomain: "neetoui.netlify.app",
104
+ },
105
+ navLinks: NAV_LINKS,
106
+ profileInfo: {
107
+ name: "Kieran Miller",
108
+ email: "kieranmiller@gmail.com",
109
+ imageUrl: "https://randomuser.me/api/portraits/women/90.jpg",
110
+ dropdownProps: [
111
+ {
112
+ label: "Edit",
113
+ onClick: () => {},
114
+ },
115
+ {
116
+ label: "Logout",
117
+ onClick: () => {},
118
+ },
119
+ ],
120
+ },
121
+ showAppSwitcher: true,
122
+ appName: "neetoUI",
74
123
  };
@@ -43,7 +43,7 @@ WithLabel.args = {
43
43
 
44
44
  export const WithCustomLabel = Template.bind({});
45
45
  WithCustomLabel.args = {
46
- label: <span className="ml-3 shadow-md">Switch Label Example</span>,
46
+ label: <span className="neeto-ui-text-info">Custom Label Example</span>,
47
47
  };
48
48
 
49
49
  export const WithChangeListner = Template.bind({});
@@ -2,6 +2,7 @@ import React from "react";
2
2
 
3
3
  import Button from "../lib/components/Button";
4
4
  import Tooltip from "../lib/components/Tooltip";
5
+ import Typography from "../lib/components/Typography";
5
6
 
6
7
  export default {
7
8
  title: "Overlays/Tooltip",
@@ -115,3 +116,22 @@ export const Themes = () => {
115
116
  </div>
116
117
  );
117
118
  };
119
+
120
+ export const TooltipOnText = () => {
121
+ return (
122
+ <div className=" p-10 flex items-center justify-center space-x-6">
123
+ <Tooltip placement="top" content={"Tooltip"}>
124
+ <Typography>Top</Typography>
125
+ </Tooltip>
126
+ <Tooltip placement="bottom" content={"Tooltip"}>
127
+ <Typography>Bottom</Typography>
128
+ </Tooltip>
129
+ <Tooltip placement="left" content={"Tooltip"}>
130
+ <Typography>Left</Typography>
131
+ </Tooltip>
132
+ <Tooltip placement="right" content={"Tooltip"}>
133
+ <Typography>Right</Typography>
134
+ </Tooltip>
135
+ </div>
136
+ );
137
+ };