{children}; 13 | case 'bulleted-list': 14 | return
{children}
; 29 | } 30 | }; 31 | 32 | export default Element; 33 | export { Element }; 34 | -------------------------------------------------------------------------------- /src/pages/Blog/BlogEditor/Renderer/Elements/ImageElement.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useSelected, useFocused } from 'slate-react'; 3 | 4 | import { IProps } from '../Types'; 5 | 6 | const ImageElement = ({ attributes, children, element }: IProps) => { 7 | const selected = useSelected(); 8 | const focused = useFocused(); 9 | return ( 10 |{children}
;
16 | }
17 |
18 | if (leaf.italic) {
19 | children = {children};
20 | }
21 |
22 | if (leaf.underline) {
23 | children = {children};
24 | }
25 |
26 | return {children};
27 | };
28 |
29 | export default Leaf;
30 | export { Leaf };
31 |
--------------------------------------------------------------------------------
/src/pages/Blog/BlogEditor/Renderer/Types.ts:
--------------------------------------------------------------------------------
1 | export interface IProps {
2 | attributes: any;
3 | children: any;
4 | element: any;
5 | }
6 |
--------------------------------------------------------------------------------
/src/pages/Blog/BlogEditor/Renderer/index.ts:
--------------------------------------------------------------------------------
1 | import { Element } from './Element';
2 | import { Leaf } from './Leaf';
3 |
4 | export { Element, Leaf };
--------------------------------------------------------------------------------
/src/pages/Blog/BlogEditor/index.ts:
--------------------------------------------------------------------------------
1 | import { BlogEditor } from './BlogEditor';
2 | import { BlogPreview } from './BlogPreview';
3 |
4 | export default BlogEditor;
5 | export { BlogEditor, BlogPreview };
6 |
--------------------------------------------------------------------------------
/src/pages/Blog/BlogElement/BlogElement.style.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 | import { Link } from 'react-router-dom';
3 |
4 | import { BackgroundLine } from '../../../commonStyles';
5 |
6 | export const StyledBackgroundLine = styled(BackgroundLine)`
7 | z-index: -1;
8 | top: 20px;
9 | width: 0;
10 | `;
11 |
12 | export const MainContainer = styled.div`
13 | background: #fff;
14 | box-sizing: border-box;
15 | width: 100%;
16 | padding-bottom: 20px;
17 |
18 | h2 {
19 | font-size: 16px;
20 | font-weight: 400;
21 | margin: 20px 0 0 0;
22 | }
23 |
24 | :hover {
25 | ${StyledBackgroundLine} {
26 | width: 100%;
27 | }
28 | }
29 |
30 | img {
31 | width: 100%;
32 | }
33 | `;
34 |
35 | export const TitleContainer = styled.div`
36 | position: relative;
37 | width: fit-content;
38 | padding: 0 5px 0 0;
39 | margin-top: 20px;
40 | z-index: 1;
41 |
42 | h1 {
43 | font-size: 24px;
44 | font-weight: 600;
45 | color: rgba(0, 0, 0, 1);
46 | margin: 0;
47 | }
48 | `;
49 |
50 | export const CreatorMainContainer = styled.div`
51 | margin-top: 21px;
52 | max-width: 420px;
53 | `;
54 |
55 | export const StyledLink = styled(Link)`
56 | text-decoration: none;
57 | width: 100%;
58 | box-sizing: border-box;
59 | `;
60 |
--------------------------------------------------------------------------------
/src/pages/Blog/BlogElement/index.ts:
--------------------------------------------------------------------------------
1 | import { BlogElement } from './BlogElement';
2 |
3 | export default BlogElement;
4 | export { BlogElement };
5 |
--------------------------------------------------------------------------------
/src/pages/Blog/Category/BlogContainer/index.ts:
--------------------------------------------------------------------------------
1 | import { BlogContainer } from './BlogContainer';
2 |
3 | export default BlogContainer;
4 | export { BlogContainer };
5 |
--------------------------------------------------------------------------------
/src/pages/Blog/Category/Design.style.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 | import { BackgroundLine } from '../../../commonStyles';
4 |
5 | export const MainContainer = styled.div`
6 | margin-top: 70px;
7 | h2 {
8 | font-size: 20px;
9 | color: rgba(0, 0, 0, 1);
10 | font-weight: 400;
11 | margin: 24px 0 0 0;
12 | }
13 | `;
14 |
15 | export const StyledBackgroundLine = styled(BackgroundLine)`
16 | z-index: -1;
17 | top: 70px;
18 | left: 5px;
19 | `;
20 |
21 | export const TitleContainer = styled.div`
22 | position: relative;
23 | width: fit-content;
24 | padding: 0 5px 0 0;
25 |
26 | h1 {
27 | font-size: 73px;
28 | font-weight: 500;
29 | color: rgba(0, 0, 0, 1);
30 | margin: 0;
31 | }
32 | `;
33 |
--------------------------------------------------------------------------------
/src/pages/Blog/Category/Tags/Tags.style.ts:
--------------------------------------------------------------------------------
1 | import styled from "styled-components";
2 |
3 | export const MainContainer = styled.div`
4 | border-bottom: 1px solid rgba(213, 213, 213, 1);
5 | padding-bottom: 25px;
6 | margin-top: 25px;
7 | display: flex;
8 | transition: 0.4s;
9 |
10 | p {
11 | font-weight: 600;
12 | font-size: 13px;
13 | text-transform: uppercase;
14 | color: rgba(130, 132, 142, 1);
15 | margin: 0 40px 0 0;
16 | cursor: pointer;
17 |
18 | :hover {
19 | color: rgba(120, 96, 250, 1);
20 | }
21 | }
22 | `;
23 |
--------------------------------------------------------------------------------
/src/pages/Blog/Category/Tags/Tags.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import { MainContainer } from './Tags.style';
4 |
5 | interface IProps {
6 | tags: string[];
7 | }
8 |
9 | const Tags = ({ tags }: IProps) => {
10 | return (
11 | {elem}
14 | ))} 15 |