Skip to content

Commit

Permalink
Remove obviated prop
Browse files Browse the repository at this point in the history
  • Loading branch information
charliepark committed Sep 9, 2024
1 parent b64a257 commit c613f23
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/ui/lib/FieldLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ interface FieldLabelProps {
tip?: string
optional?: boolean
className?: string
hideOptionalTag?: boolean
}

export const FieldLabel = ({
Expand All @@ -28,14 +27,13 @@ export const FieldLabel = ({
optional,
as,
className,
hideOptionalTag,
}: PropsWithChildren<FieldLabelProps>) => {
const Component = as || 'label'
return (
<div className={cn(className, 'flex h-4 items-center space-x-2')}>
<Component id={id} className="flex items-center text-sans-md" htmlFor={htmlFor}>
{children}
{optional && !hideOptionalTag && (
{optional && (
// Announcing this optional text is unnecessary as the required attribute on the
// form will be used
<span className="pl-1 text-tertiary" aria-hidden="true">
Expand Down

0 comments on commit c613f23

Please sign in to comment.