@sikka/hawa 0.0.196 → 0.0.198

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": "@sikka/hawa",
3
- "version": "0.0.196",
3
+ "version": "0.0.198",
4
4
  "description": "SaaS Oriented UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -3,7 +3,7 @@ import { BsThreeDotsVertical } from "react-icons/bs"
3
3
  import clsx from "clsx"
4
4
  import { HawaMenu } from "./HawaMenu"
5
5
  // TODO: make action click return row
6
-
6
+ // TODO: make action column width max fit
7
7
  type TableTypes = {
8
8
  columns: any[string]
9
9
  actions?: ActionItems[][]
@@ -77,7 +77,11 @@ export const HawaTable: React.FunctionComponent<TableTypes> = ({
77
77
  ) : null}
78
78
  </tr>
79
79
  </thead>
80
- <tbody className={customColor ? `bg-${customColor}` : "bg-white"}>
80
+ <tbody
81
+ className={
82
+ customColor && props.rows ? `bg-${customColor}` : "bg-transparent"
83
+ }
84
+ >
81
85
  {/* Table Rows */}
82
86
  {props.rows ? (
83
87
  props.rows.map((singleRow: any, rowIndex: any) => {
@@ -170,9 +174,14 @@ export const HawaTable: React.FunctionComponent<TableTypes> = ({
170
174
  )
171
175
  })
172
176
  ) : (
173
- <tr>
177
+ <tr className="bg-transparent">
174
178
  <td colSpan={props.columns.length}>
175
- <div className="w-full rounded-b bg-white p-5 text-center">
179
+ <div
180
+ className={clsx(
181
+ "w-full rounded-b bg-white p-5 text-center",
182
+ customColor ? `bg-${customColor}` : "bg-white"
183
+ )}
184
+ >
176
185
  {props.noDataText}
177
186
  </div>
178
187
  </td>