2024-04-11 09:35:20 +02:00
|
|
|
import { ThemeStyle } from '@joplin/lib/theme';
|
|
|
|
|
2020-09-15 15:01:07 +02:00
|
|
|
const styled = require('styled-components').default;
|
|
|
|
const { css } = require('styled-components');
|
|
|
|
|
|
|
|
interface IconProps {
|
2024-04-11 09:35:20 +02:00
|
|
|
readonly theme: ThemeStyle;
|
2024-08-03 17:42:46 +02:00
|
|
|
readonly hasTitle: boolean;
|
2020-09-15 15:01:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const iconStyle = css<IconProps>`
|
2020-11-12 21:13:28 +02:00
|
|
|
font-size: ${(props: IconProps) => props.theme.toolbarIconSize}px;
|
|
|
|
color: ${(props: IconProps) => props.theme.color3};
|
2024-08-03 17:42:46 +02:00
|
|
|
margin-right: ${(props: IconProps) => props.hasTitle ? 5 : 0}px;
|
2020-11-08 03:23:12 +02:00
|
|
|
pointer-events: none; /* Need this to get button tooltip to work */
|
2020-09-15 15:01:07 +02:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const StyledIconI = styled.i`${iconStyle}`;
|
|
|
|
export const StyledIconSpan = styled.span`${iconStyle}`;
|