2021-11-03 01:27:25 +08:00
|
|
|
import styled from 'styled-components';
|
|
|
|
|
|
|
|
import {
|
|
|
|
toolbarButtonWidth,
|
|
|
|
toolbarButtonHeight,
|
|
|
|
toolbarItemOutlineOffset,
|
|
|
|
toolbarButtonBorder,
|
|
|
|
toolbarButtonBorderRadius,
|
|
|
|
} from '/imports/ui/stylesheets/styled-components/general';
|
|
|
|
import {
|
|
|
|
toolbarButtonBorderColor,
|
|
|
|
toolbarListColor,
|
|
|
|
toolbarButtonColor,
|
2021-11-03 04:05:49 +08:00
|
|
|
toolbarListBg,
|
2021-11-03 01:27:25 +08:00
|
|
|
toolbarListBgFocus,
|
|
|
|
} from '/imports/ui/stylesheets/styled-components/palette';
|
|
|
|
import { toolbarButtonFontSize } from '/imports/ui/stylesheets/styled-components/typography';
|
2022-02-15 04:20:50 +08:00
|
|
|
import Button from '/imports/ui/components/common/button/component';
|
2021-11-03 01:27:25 +08:00
|
|
|
|
|
|
|
const ButtonWrapper = styled.div`
|
|
|
|
width: ${toolbarButtonWidth};
|
|
|
|
min-width: ${toolbarButtonWidth};
|
|
|
|
height: ${toolbarButtonHeight};
|
|
|
|
min-height: ${toolbarButtonHeight};
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
& > button {
|
|
|
|
outline-offset: ${toolbarItemOutlineOffset};
|
|
|
|
border-bottom: ${toolbarButtonBorder} solid ${toolbarButtonBorderColor};
|
|
|
|
}
|
|
|
|
|
|
|
|
&:first-child > button {
|
|
|
|
border-top-left-radius: ${toolbarButtonBorderRadius};
|
|
|
|
border-bottom-left-radius: ${toolbarButtonBorderRadius};
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const SubmenuButton = styled(Button)`
|
|
|
|
padding: 0;
|
|
|
|
border: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center !important;
|
|
|
|
justify-content: center !important;
|
|
|
|
position: relative;
|
|
|
|
border-radius: 0;
|
|
|
|
box-shadow: none !important;
|
|
|
|
z-index: 1;
|
|
|
|
font-size: ${toolbarButtonFontSize};
|
|
|
|
color: ${toolbarButtonColor};
|
|
|
|
border-color: ${toolbarButtonBorderColor};
|
2021-11-03 04:05:49 +08:00
|
|
|
background-color: ${toolbarListBg};
|
2021-11-03 01:27:25 +08:00
|
|
|
|
|
|
|
&:focus,
|
|
|
|
&:hover {
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
& > i {
|
2021-11-03 04:05:49 +08:00
|
|
|
color: ${toolbarListColor};
|
2021-11-03 01:27:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
${({ state }) => state === 'selected' && `
|
|
|
|
background-color: ${toolbarListColor} !important;
|
2021-11-03 04:05:49 +08:00
|
|
|
background:red;
|
2021-11-03 01:27:25 +08:00
|
|
|
|
|
|
|
& > i {
|
|
|
|
color: ${toolbarListBgFocus} !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
& > svg {
|
|
|
|
fill: ${toolbarListBgFocus};
|
|
|
|
}
|
|
|
|
`}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default {
|
|
|
|
ButtonWrapper,
|
|
|
|
SubmenuButton,
|
|
|
|
};
|