bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-reply-intention/styles.tsx

83 lines
1.8 KiB
TypeScript
Raw Normal View History

2024-10-03 06:28:02 +08:00
import styled, { css } from 'styled-components';
import {
2024-10-17 03:10:27 +08:00
colorGrayLightest,
2024-10-03 06:28:02 +08:00
colorOffWhite,
2024-10-17 03:10:27 +08:00
colorPrimary,
2024-10-03 06:28:02 +08:00
} from '/imports/ui/stylesheets/styled-components/palette';
2024-10-17 03:10:27 +08:00
import {
mdPadding, smPadding, smPaddingX, xlPadding,
} from '/imports/ui/stylesheets/styled-components/general';
import EmojiButton from '../chat-message-list/page/chat-message/message-toolbar/emoji-button/component';
2024-10-03 06:28:02 +08:00
const Container = styled.div<{ $hidden: boolean; $animations: boolean }>`
2024-10-17 03:10:27 +08:00
border-radius: 0.375rem;
2024-10-03 06:28:02 +08:00
background-color: ${colorOffWhite};
position: relative;
overflow: hidden;
2024-10-17 03:10:27 +08:00
box-shadow: inset 0 0 0 1px ${colorGrayLightest};
display: flex;
[dir='ltr'] & {
border-right: 0.375rem solid ${colorPrimary};
}
[dir='rtl'] & {
border-left: 0.375rem solid ${colorPrimary};
}
2024-10-03 06:28:02 +08:00
${({ $hidden }) => ($hidden
? css`
height: 0;
2024-10-17 03:10:27 +08:00
min-height: 0;
2024-10-03 06:28:02 +08:00
`
: css`
2024-10-17 03:10:27 +08:00
min-height: calc(1rem + ${mdPadding} * 2);
height: calc(1rem + ${mdPadding} * 2);
padding: ${mdPadding} calc(${smPaddingX} * 1.25);
margin-bottom: ${smPadding};
[dir='ltr'] & {
margin-right: ${xlPadding};
}
[dir='rtl'] & {
margin-left: ${xlPadding};
}
2024-10-03 06:28:02 +08:00
`
)}
${({ $animations }) => $animations
&& css`
2024-10-17 03:10:27 +08:00
transition-property: height, min-height;
2024-10-03 06:28:02 +08:00
transition-duration: 0.1s;
`}
`;
const Typography = styled.div`
2024-10-17 03:10:27 +08:00
line-height: 1;
2024-10-03 06:28:02 +08:00
font-size: 1rem;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
`;
2024-10-17 03:10:27 +08:00
const Message = styled(Typography)`
font-size: 1rem;
2024-10-17 03:10:27 +08:00
line-height: 1;
white-space: nowrap;
overflow: hidden;
2024-10-17 03:10:27 +08:00
flex-grow: 1;
`;
2024-10-03 06:28:02 +08:00
2024-10-17 03:10:27 +08:00
const CloseBtn = styled(EmojiButton)`
font-size: 75%;
height: 1rem;
padding: 0;
2024-10-03 06:28:02 +08:00
`;
export default {
Container,
CloseBtn,
Message,
};