Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: some styles with dynamic select and dropdown #1457

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,12 @@ function CustodyEnumField({
className="w-full justify-start font-normal [&_span]:w-full [&_span]:max-w-full [&_span]:truncate"
>
<div className="flex items-center justify-between">
<span className=" text-left">
<span
className={tw(
"text-left",
selectedIds.length <= 0 && "text-gray-500"
)}
>
{value === "without-custody"
? "Without custody"
: selectedIds.length > 0
Expand Down Expand Up @@ -675,7 +680,12 @@ function CategoryEnumField({
className="w-full justify-start font-normal [&_span]:w-full [&_span]:max-w-full [&_span]:truncate"
>
<div className="flex items-center justify-between">
<span className="text-left">
<span
className={tw(
"text-left",
selectedIds.length <= 0 && "text-gray-500"
)}
>
{selectedIds.length > 0
? selectedIds
.map((id) => {
Expand Down Expand Up @@ -778,7 +788,12 @@ function LocationEnumField({
className="w-full justify-start font-normal [&_span]:w-full [&_span]:max-w-full [&_span]:truncate"
>
<div className="flex items-center justify-between">
<span className="text-left">
<span
className={tw(
"text-left",
selectedIds.length <= 0 && "text-gray-500"
)}
>
{selectedIds.length > 0
? selectedIds
.map((id) => {
Expand Down Expand Up @@ -881,7 +896,12 @@ function KitEnumField({
className="w-full justify-start font-normal [&_span]:w-full [&_span]:max-w-full [&_span]:truncate"
>
<div className="flex items-center justify-between">
<span className="text-left">
<span
className={tw(
"text-left",
selectedIds.length <= 0 && "text-gray-500"
)}
>
{selectedIds.length > 0 && data.kits && data.kits.length > 0
? selectedIds
.map((id) => {
Expand Down
2 changes: 1 addition & 1 deletion app/components/assets/custom-fields-inputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function AssetCustomFields({
DATE: (field) => (
<div className="flex w-full items-end">
<Input
className="w-full"
className="w-full placeholder:text-gray-500"
label={field.name}
hideLabel
type="date"
Expand Down
7 changes: 6 additions & 1 deletion app/components/dynamic-select/dynamic-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@ export default function DynamicSelect({
ref={triggerRef}
className="flex w-full items-center justify-between whitespace-nowrap rounded border border-gray-300 px-[14px] py-2 text-[14px] hover:cursor-pointer disabled:opacity-50"
>
<span className="truncate whitespace-nowrap pr-2">
<span
className={tw(
"truncate whitespace-nowrap pr-2",
selectedValue === undefined && "text-gray-500"
)}
>
{triggerValue}
</span>
<ChevronDownIcon />
Expand Down
Loading