1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-17 18:44:45 +02:00
joplin/packages/app-desktop/gui/ToolbarButton/styles/index.ts

20 lines
634 B
TypeScript
Raw Normal View History

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 {
readonly theme: ThemeStyle;
readonly hasTitle: boolean;
2020-09-15 15:01:07 +02:00
}
const iconStyle = css<IconProps>`
font-size: ${(props: IconProps) => props.theme.toolbarIconSize}px;
color: ${(props: IconProps) => props.theme.color3};
margin-right: ${(props: IconProps) => props.hasTitle ? 5 : 0}px;
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}`;