feat: Initial clean release of CHM
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
这个提交包含在:
@@ -0,0 +1,68 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faPrint, faDownload, faSquareArrowUpRight, faXmark, IconDefinition } from '@fortawesome/free-solid-svg-icons';
|
||||
import { IconButtonProps } from '../types';
|
||||
|
||||
|
||||
const ButtonElement = styled.button<{ hoverColor?: string; size?: number; color?: string }>`
|
||||
padding: 0.2rem 0.7rem;
|
||||
cursor: pointer;
|
||||
border: solid thin transparent;
|
||||
border-radius: 5px;
|
||||
user-select: none;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: ${props=> props.size || 1}rem;
|
||||
background: transparent;
|
||||
color: var(--${props=>props.color || 'grey'});
|
||||
&:hover {
|
||||
background: #7676764d;
|
||||
${props=>props.hoverColor && `color: var(--${props.hoverColor})`}
|
||||
}
|
||||
`;
|
||||
|
||||
interface BaseButtonProps {
|
||||
icon: IconDefinition;
|
||||
onClick: ()=> void;
|
||||
name: string;
|
||||
size: number;
|
||||
color: string;
|
||||
hoverColor?: string;
|
||||
}
|
||||
|
||||
function BaseButton({ onClick, icon, name, size, color, hoverColor }: BaseButtonProps) {
|
||||
return (
|
||||
<ButtonElement onClick={onClick} title={name}
|
||||
color={color}
|
||||
size={size}
|
||||
hoverColor={hoverColor || 'secondary'}>
|
||||
<FontAwesomeIcon icon={icon} />
|
||||
</ButtonElement>
|
||||
);
|
||||
}
|
||||
|
||||
export function OpenLinkButton({ onClick, size, color }: IconButtonProps) {
|
||||
return (
|
||||
<BaseButton onClick={onClick} icon={faSquareArrowUpRight} name='Open in another app' size={size} color={color} />
|
||||
);
|
||||
}
|
||||
|
||||
export function CloseButton({ onClick, size, color }: IconButtonProps) {
|
||||
return (
|
||||
<BaseButton onClick={onClick} icon={faXmark} name='Close' size={size} color={color} hoverColor={'red'} />
|
||||
);
|
||||
}
|
||||
|
||||
export function DownloadButton({ onClick, size, color }: IconButtonProps) {
|
||||
return (
|
||||
<BaseButton onClick={onClick} icon={faDownload} name='Download' size={size} color={color} />
|
||||
);
|
||||
}
|
||||
|
||||
export function PrintButton({ onClick, size, color }: IconButtonProps) {
|
||||
return (
|
||||
<BaseButton onClick={onClick} icon={faPrint} name='Print' size={size} color={color} />
|
||||
);
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户