Skip to content

Commit 0f19045

Browse files
refactor(label): rename to label with subtitle, remove pseudo label
1 parent 6de848b commit 0f19045

File tree

3 files changed

+5
-29
lines changed

3 files changed

+5
-29
lines changed

lib/input/label/Label.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ export const Label: Component<ComponentProps<"label">> = (p) => {
77
return (
88
<label
99
class={classMerge(
10-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
10+
"font-medium leading-none", // font
11+
"whitespace-nowrap", // no text wrapping
12+
"peer-disabled:cursor-not-allowed peer-disabled:opacity-70", // disabled
1113
s.class,
1214
)}
1315
{...rest}
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,9 @@ export interface Label2PropsFor extends Label2Props {
1616
forId: string
1717
}
1818

19-
export function Label2(p: Label2PropsFor) {
19+
export function LabelWithSubtitle(p: Label2PropsFor) {
2020
return (
21-
<Label
22-
class={classMerge("font-medium whitespace-nowrap", p.disabled && "cursor-not-allowed opacity-70", p.labelClass)}
23-
for={p.forId}
24-
id={p.id}
25-
>
21+
<Label class={classMerge("", p.labelClass)} for={p.forId} id={p.id}>
2622
{p.title}
2723
{p.required && <LabelAsterix />}
2824
{p.subtitle && (

lib/input/label/PseudoLabel2.tsx

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)