master @ 15 LINES
[ HISTORY ] [ UP ]
┌─ TS ───────────────────────────────────────────────────────────────────────┐
│ import { len } from "../../lib/ascii"; │
│ │
│ export interface Props { │
│ label: string; │
│ href?: string; │
│ type?: "button" | "submit" | "reset"; │
│ variant?: "default" | "primary"; │
│ disabled?: boolean; │
│ /** Marks a link as the current page (aria-current). */ │
│ current?: boolean; │
│ } │
│ │
│ // "[ " + label + " ]" │
│ export const buttonWidth = (label: string) => len(label) + 4; │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ TS ─────────────────────────────────┐
│ import { len } from "../../lib/ascii"; │
│ │
│ export interface Props { │
│ label: string; │
│ href?: string; │
│ type?: "button" | "submit" | "reset"; │
│ variant?: "default" | "primary"; │
│ disabled?: boolean; │
│ /** Marks a link as the current page (aria │
│ -current). */ │
│ current?: boolean; │
│ } │
│ │
│ // "[ " + label + " ]" │
│ export const buttonWidth = (label: string) = │
│ > len(label) + 4; │
└──────────────────────────────────────────────┘
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET