Skip to content

Commit

Permalink
fix: tracker, order utils, table types (#3)
Browse files Browse the repository at this point in the history
* update tracker onclick

* fix: update order inputs

* add changelog

* update table types

* fix: improve dark mode

* update barlist

* update banner

---------

Co-authored-by: christopherkindl <53372002+christopherkindl@users.noreply.github.com>
  • Loading branch information
severinlandolt and christopherkindl authored Mar 28, 2024
1 parent 4e57bb9 commit d0f4de6
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<br />

![Tremor Banner](public/images/tremor_raw_banner_11.png)
![Tremor Banner](public/images/tremor-raw-banner.png)

<br />

Expand Down
Binary file added public/images/tremor-raw-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/tremor_raw_banner_11.png
Binary file not shown.
6 changes: 3 additions & 3 deletions src/components/BarList/BarList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tremor Raw BarList [v0.0.0]
// Tremor Raw BarList [v0.0.1]

import React from "react"

Expand Down Expand Up @@ -73,7 +73,7 @@ function BarListInner<T>(
focusRing,
onValueChange
? [
"!-m-px cursor-pointer",
"!-m-0 cursor-pointer",
// hover
"hover:bg-gray-50 hover:dark:bg-gray-900",
]
Expand All @@ -98,7 +98,7 @@ function BarListInner<T>(
)}
style={{ width: `${widths[index]}%` }}
>
<div className={cx("absolute left-2 flex max-w-full")}>
<div className={cx("absolute left-2 flex pr-2 max-w-full")}>
{item.href ? (
<a
href={item.href}
Expand Down
8 changes: 7 additions & 1 deletion src/components/BarList/barlist.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,15 @@ export const WithOnValueChangeAndHref: Story = {
},
}

export const DataSame: Story = {
export const DataSameWithOnValueChange: Story = {
args: {
onValueChange: () => {},
data: dataSame,
},
}

export const DataSame: Story = {
args: {
data: dataSame,
},
}
5 changes: 4 additions & 1 deletion src/components/BarList/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Tremor Raw BarList Changelog

## 0.0.0
## 0.0.1

### Changes

* Improve spacing when bar is a button.
* Improve padding for long labels.
8 changes: 4 additions & 4 deletions src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tremor Raw Table [v0.0.0]
// Tremor Raw Table [v0.0.1]

import React from "react"

Expand Down Expand Up @@ -27,7 +27,7 @@ TableRoot.displayName = "TableRoot"

const Table = React.forwardRef<
HTMLTableElement,
React.HTMLAttributes<HTMLTableElement>
React.TableHTMLAttributes<HTMLTableElement>
>(({ className, ...props }, forwardedRef) => (
<table
ref={forwardedRef}
Expand Down Expand Up @@ -55,7 +55,7 @@ TableHead.displayName = "TableHead"

const TableHeaderCell = React.forwardRef<
HTMLTableCellElement,
React.TdHTMLAttributes<HTMLTableCellElement>
React.ThHTMLAttributes<HTMLTableCellElement>
>(({ className, ...props }, forwardedRef) => (
<th
ref={forwardedRef}
Expand Down Expand Up @@ -112,7 +112,7 @@ TableRow.displayName = "TableRow"

const TableCell = React.forwardRef<
HTMLTableCellElement,
React.HTMLAttributes<HTMLTableCellElement>
React.TdHTMLAttributes<HTMLTableCellElement>
>(({ className, ...props }, forwardedRef) => (
<td
ref={forwardedRef}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Table/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Tremor Raw Table Changelog

## 0.0.0
## 0.0.1

### Changes

* Improved types of table elements: Table, TableHeaderCell, TableCell
6 changes: 3 additions & 3 deletions src/components/Toast/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const Toast = React.forwardRef<
// background color
" bg-white dark:bg-[#090E1A]",
// border color
"border-gray-200 dark:border-gray-900",
"border-gray-200 dark:border-gray-800",
// swipe
"data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none",
// transition
Expand All @@ -132,7 +132,7 @@ const Toast = React.forwardRef<
"flex flex-1 items-start gap-3 p-4",
// border
!disableDismiss || action
? "border-r border-gray-200 dark:border-gray-900"
? "border-r border-gray-200 dark:border-gray-800"
: "",
)}
>
Expand Down Expand Up @@ -176,7 +176,7 @@ const Toast = React.forwardRef<
>
{action.label}
</ToastPrimitives.Action>
<div className="h-px w-full bg-gray-200 dark:bg-gray-900" />
<div className="h-px w-full bg-gray-200 dark:bg-gray-800" />
</>
)}
{!disableDismiss && (
Expand Down
4 changes: 3 additions & 1 deletion src/components/Toast/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Tremor Raw Toast Changelog

## 0.0.0
## 0.0.1

### Changes

* Improved dark mode visbility

0 comments on commit d0f4de6

Please sign in to comment.