Skip to content

Commit

Permalink
Merge pull request #9 from procraft/current-dev
Browse files Browse the repository at this point in the history
SL-5409 Current dev
  • Loading branch information
EugiSma authored Mar 11, 2024
2 parents 42e1055 + b784162 commit 00ae2f1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/HtmlTag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export const HtmlTag: RedactorComponent = ({
const extraProps = (() => {
if (['link', 'meta'].includes(tagLower)) return null
let __html = object.components[0]?.props.text ?? ''
// добавила проверку чтобы при создании нового компонента, в него можно было добавлять теги style и script
if (tagLower === 'style' || tagLower === 'script') __html = text ?? __html
return {dangerouslySetInnerHTML: {__html}}
})()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,22 @@ export const RedactorComponentWrapper: React.FC<

const titleNode = document.createElement('span')
titleNode.innerHTML = `
<span>${
<span style="font-family:'Inter';font-size:12px;color:white">${
wrapperTitle
? wrapperTitle
: `${object.name} ${
object.name !== object.component ? ` (${object.component})` : ''
}`
}</span>
<span>${object.props.tag || ''}</span>
<span style="font-family:'Inter';font-size:12px;color:white">${object.props.tag || ''}</span>
`

const titleStyle: Partial<CSSStyleDeclaration> = {
position: 'absolute',
backgroundColor: '#252424',
color: 'white',
padding: '2px 5px',
fontFamily: 'Inter sans-serif',
fontSize: '12px',
top: '-25px',
// bottom: '0px',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const RedactorComponentWrapperButtonsStyled = styled.div`
padding: 0;
border-radius: 50%;
background: #2563eb;
border: 1px solid #ffffff;
&:active {
background: #1d4ed8;
Expand All @@ -41,7 +42,8 @@ export const RedactorComponentWrapperStyled = styled.div`
${RedactorComponentWrapperButtonsStyled} {
position: absolute;
bottom: calc(100% - 14px);
right: 14px;
right: 50%;
transform: translateX(50%);
display: flex;
}
Expand Down Expand Up @@ -106,6 +108,7 @@ export const RedactorComponentWrapperGlobalStyled = createGlobalStyle`
fill: white;
background: rgb(37, 99, 235);
border-radius: 50%;
border: 1px solid white;
}
&:hover {
Expand Down
1 change: 1 addition & 0 deletions src/styles/GlobalStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { SectionStyled } from '../components/Section/styles'
export const LmsFrontRedactorGlobalStyle = createGlobalStyle`
[role=redactor-wrapper] * {
font-size: 14px;
box-sizing: border-box;
}
Expand Down
1 change: 1 addition & 0 deletions src/ui/AddWidgetButton/AddWidgetModal/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const AddWidgetModalStyled = styled(Modal2)`
& .vidgets {
display: flex;
flex-direction: column;
color: #000000;
& button {
display: flex;
Expand Down

0 comments on commit 00ae2f1

Please sign in to comment.