You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Tools: Apply rule @typescript-eslint/type-annotation-spacing
This commit is contained in:
@ -12,18 +12,18 @@ interface Props {
|
||||
readonly backgroundHover?: boolean,
|
||||
}
|
||||
|
||||
function isFontAwesomeIcon(iconName:string) {
|
||||
function isFontAwesomeIcon(iconName: string) {
|
||||
const s = iconName.split(' ');
|
||||
return s.length === 2 && ['fa', 'fas'].includes(s[0]);
|
||||
}
|
||||
|
||||
function getProp(props:Props, name:string, defaultValue:any = null) {
|
||||
function getProp(props: Props, name: string, defaultValue: any = null) {
|
||||
if (props.toolbarButtonInfo && (name in props.toolbarButtonInfo)) return (props.toolbarButtonInfo as any)[name];
|
||||
if (!(name in props)) return defaultValue;
|
||||
return (props as any)[name];
|
||||
}
|
||||
|
||||
export default function ToolbarButton(props:Props) {
|
||||
export default function ToolbarButton(props: Props) {
|
||||
const title = getProp(props, 'title', '');
|
||||
const tooltip = getProp(props, 'tooltip', title);
|
||||
|
||||
|
Reference in New Issue
Block a user