Sha256: d612a64af96a9346b546ce1483ba6d886336a796f40c8b311de1c7be7ccc39f0
Contents?: true
Size: 589 Bytes
Versions: 1
Compression:
Stored size: 589 Bytes
Contents
type Props = { name: string; locale: string; dir?: string; editUrl?: string; } export default function PageName(props: Props) { const { name, locale, dir, editUrl } = props; const span = ( <span dir={dir} lang={locale}> {name || <i className="untitled">Untitled</i>} </span> ); const preventDrag = (evt: React.MouseEvent) => { evt.preventDefault(); }; if (editUrl) { return ( <a href={editUrl} className="name" onDragStart={preventDrag}> {span} </a> ); } else { return <span className="name">{span}</span>; } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pages_core-3.15.5 | app/javascript/components/PageTree/PageName.tsx |