Skip to content

Commit

Permalink
fix: correctly style untitled resources
Browse files Browse the repository at this point in the history
  • Loading branch information
malfynnction committed Jan 27, 2024
1 parent e618fd6 commit 08f60ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/components/CategoryMonth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import EnvelopeMonth from './EnvelopeMonth'
import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/20/solid'
import { formatMoney } from '../lib/format'
import { safeName } from '../lib/name-helper'

type props = {
category: CategoryMonthType
Expand Down Expand Up @@ -57,15 +58,17 @@ const CategoryMonth = ({
scope="colgroup"
className="px-4 py-2 text-left text-sm font-bold text-gray-900 dark:text-gray-300 sm:px-6 text-ellipsis"
>
<span className="flex items-center">
<span
className={`flex items-center ${!category.name ? 'italic' : ''}`}
>
<button>
{showEnvelopes ? (
<ChevronUpIcon className="icon" />
) : (
<ChevronDownIcon className="icon" />
)}
</button>
{category.name}
{safeName(category, 'category', t('categories.category'))}
</span>
</th>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/components/EnvelopeMonth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const EnvelopeMonth = ({
<Link
to={`/envelopes/${envelope.id}`}
className={`h-full block whitespace-nowrap py-4 pl-4 pr-1 text-sm font-medium text-gray-900 dark:text-gray-300 sm:pl-6 overflow-hidden text-ellipsis ${
!envelope.name && 'italic'
!envelope.name ? 'italic' : ''
}`}
>
{safeName(envelope, 'envelope')}
Expand Down
4 changes: 1 addition & 3 deletions src/components/ExternalAccountsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ const ExternalAccountsList = ({ budget }: { budget: Budget }) => {
<div>
<div
className={`${
typeof account.name === 'undefined'
? 'italic'
: ''
!account.name ? 'italic' : ''
} text-sm font-medium text-gray-900 dark:text-gray-100 flex justify-between`}
>
<span className="full-centered">
Expand Down

0 comments on commit 08f60ae

Please sign in to comment.