| 1 |
import { addProperty } from "../../../helpers/helper"; |
| 2 |
import { AUTHOR_BOX_WRAPPER_PADDING, AUTHOR_BOX_BACKGROUND, AUTHOR_BOX_SIZE, AUTHOR_BOX_WRAPPER_MARGIN, AUTHOR_BOX_BORDER } from "./constants"; |
| 3 |
import { typoPrefix_author, typoPrefix_updated_time } from "./typographyPrefixConstants"; |
| 4 |
|
| 5 |
export default ( { blockId } ) => { |
| 6 |
const wrapperSelector = `.${blockId} .betterdocs-author-date`; |
| 7 |
const authorTextWrapperSelector = `.${blockId} .betterdocs-author-date .betterdocs-author > span`; |
| 8 |
const authorIconWrapper = `.${blockId} .betterdocs-author-date .betterdocs-author .author-avatar img`; |
| 9 |
const authorUpdatedTimeWrapper = `.${blockId} .betterdocs-author-date .update-date`; |
| 10 |
|
| 11 |
return [ |
| 12 |
addProperty('background', AUTHOR_BOX_BACKGROUND, { |
| 13 |
args: { noOverlay: true }, |
| 14 |
cssSelector: wrapperSelector |
| 15 |
}), |
| 16 |
addProperty('dimension', AUTHOR_BOX_WRAPPER_PADDING, { |
| 17 |
args: { styleFor: "padding" }, |
| 18 |
cssSelector: wrapperSelector |
| 19 |
}), |
| 20 |
addProperty('dimension', AUTHOR_BOX_WRAPPER_MARGIN, { |
| 21 |
args: { styleFor: "margin" }, |
| 22 |
cssSelector: wrapperSelector |
| 23 |
}), |
| 24 |
addProperty('color', 'docAuthorColor', { |
| 25 |
args: { hover: 'docAuthorColor' }, |
| 26 |
cssSelector: authorTextWrapperSelector |
| 27 |
}),, |
| 28 |
addProperty('responsive', AUTHOR_BOX_SIZE, { |
| 29 |
args: { property: "width" }, |
| 30 |
cssSelector: authorIconWrapper |
| 31 |
}), |
| 32 |
addProperty('typography', typoPrefix_author, { |
| 33 |
args: { |
| 34 |
defaultFontSize: 16, |
| 35 |
prefixConstant: typoPrefix_author, |
| 36 |
}, |
| 37 |
cssSelector: authorTextWrapperSelector |
| 38 |
}), |
| 39 |
addProperty('color', 'updatedTimeColor', { |
| 40 |
args: { hover: 'updatedTimeColor' }, |
| 41 |
cssSelector: authorUpdatedTimeWrapper |
| 42 |
}), |
| 43 |
addProperty('typography', typoPrefix_updated_time, { |
| 44 |
args: { |
| 45 |
defaultFontSize: 14, |
| 46 |
prefixConstant: typoPrefix_updated_time, |
| 47 |
}, |
| 48 |
cssSelector: authorUpdatedTimeWrapper |
| 49 |
}), |
| 50 |
addProperty('border', AUTHOR_BOX_BORDER, { |
| 51 |
args: { noShadow: true }, |
| 52 |
cssSelector: wrapperSelector |
| 53 |
}), |
| 54 |
]; |
| 55 |
} |
| 56 |
|