-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef8ab16
commit f8a27ba
Showing
4 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
packages/components/src/components/SquiggleViewer/ValueViewer/.#WithContext.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/components/src/components/SquiggleViewer/ValueViewer/UnitType.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import clsx from "clsx"; | ||
import { FC } from "react"; | ||
|
||
type UnitTypeProps = { | ||
unitType: string; | ||
}; | ||
|
||
export const UnitType: FC<UnitTypeProps> = ({ unitType }) => { | ||
return ( | ||
<div | ||
className={clsx( | ||
// Copilot auto-completed these classes but it looks pretty good | ||
"text-xs font-medium text-gray-500", | ||
"rounded-full px-2 py-0.5", | ||
/* "bg-gray-100" */ // IMO looks better without background | ||
)} | ||
> | ||
:: {unitType} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters