MCPcopy Create free account
hub / github.com/dailydotdev/apps / TabLabel

Function TabLabel

packages/shared/src/components/shell/ShellRow.tsx:152–177  ·  view source on GitHub ↗
({
  label,
  isLit,
  children,
}: {
  label: ReactNode;
  isLit?: boolean;
  children?: ReactNode;
})

Source from the content-addressed store, hash-verified

150// The lit label is bold; an invisible bold copy holds every label at its
151// bold width, so lighting a tab never moves the row.
152const TabLabel = ({
153 label,
154 isLit,
155 children,
156}: {
157 label: ReactNode;
158 isLit?: boolean;
159 children?: ReactNode;
160}): ReactElement => (
161 <span data-tab-label className="relative flex items-center">
162 {typeof label === 'string' ? (
163 <span
164 data-text={label}
165 className={classNames(
166 'inline-flex flex-col after:invisible after:h-0 after:select-none after:overflow-hidden after:font-bold after:content-[attr(data-text)]',
167 isLit ? 'font-bold' : 'font-medium',
168 )}
169 >
170 {label}
171 </span>
172 ) : (
173 <span className={isLit ? 'font-bold' : 'font-medium'}>{label}</span>
174 )}
175 {children}
176 </span>
177);
178
179const RowChip = ({
180 item,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected