PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.3.65
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.3.65
11.3.75 11.3.73 11.3.71 11.3.70 11.3.69 11.3.64 11.3.65 11.3.62 11.3.61 11.3.56 11.3.58 11.0.31 11.0.52 11.0.54 11.0.56 11.0.58 11.0.7 11.1.10 11.1.11 11.1.13 11.1.14 11.1.15 11.1.2 11.1.20 11.1.21 All 73 releases
leadin / scripts / shared / UIComponents / UIAlert.tsx

UIAlert.tsx in HubSpot All-In-One Marketing – Forms, Popups, Live Chat 11.3.65, at scripts/shared/UIComponents/UIAlert.tsx

70 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React from 'react';
2 import { styled } from '@linaria/react';
3 import { MARIGOLD_LIGHT, MARIGOLD_MEDIUM, OBSIDIAN } from './colors';
4
5 const AlertContainer = styled.div`
6 background-color: ${MARIGOLD_LIGHT};
7 border-color: ${MARIGOLD_MEDIUM};
8 color: ${OBSIDIAN};
9 font-size: 14px;
10 align-items: center;
11 justify-content: space-between;
12 display: flex;
13 border-style: solid;
14 border-top-style: solid;
15 border-right-style: solid;
16 border-bottom-style: solid;
17 border-left-style: solid;
18 border-width: 1px;
19 min-height: 60px;
20 padding: 8px 20px;
21 position: relative;
22 text-align: left;
23 `;
24
25 const Title = styled.p`
26 font-family: 'Lexend Deca';
27 font-style: normal;
28 font-weight: 700;
29 font-size: 16px;
30 line-height: 19px;
31 color: ${OBSIDIAN};
32 margin: 0;
33 padding: 0;
34 `;
35
36 const Message = styled.p`
37 font-family: 'Lexend Deca';
38 font-style: normal;
39 font-weight: 400;
40 font-size: 14px;
41 margin: 0;
42 padding: 0;
43 `;
44
45 const MessageContainer = styled.div`
46 display: flex;
47 flex-direction: column;
48 `;
49
50 interface IUIAlertProps {
51 titleText: string;
52 titleMessage: string;
53 }
54
55 export default function UIAlert({
56 titleText,
57 titleMessage,
58 children,
59 }: React.PropsWithChildren<IUIAlertProps>) {
60 return (
61 <AlertContainer>
62 <MessageContainer>
63 <Title>{titleText}</Title>
64 <Message>{titleMessage}</Message>
65 </MessageContainer>
66 {children}
67 </AlertContainer>
68 );
69 }
70