Skip to content

Add properties and CSS controls to components #684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
font style property created and added in textDisplay component
  • Loading branch information
imtananikhwa committed Feb 14, 2024
commit 37a901ab680fcda2c2189db711191c9e0170f55a
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"scripts": {
"start": "yarn workspace lowcoder start",
"start-win":"LOWCODER_API_SERVICE_URL=http://localhost:3000 yarn start",
"start:ee": "REACT_APP_EDITION=enterprise yarn workspace lowcoder start",
"start:ee-global": "REACT_APP_EDITION=enterprise-global yarn workspace lowcoder start",
"build": "yarn node ./scripts/build.js",
Expand Down
9 changes: 5 additions & 4 deletions client/packages/lowcoder/src/comps/comps/textComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const getStyle = (style: TextStyleType) => {
font-size: ${style.textSize} !important;
font-weight: ${style.textWeight} !important;
font-family: ${style.fontFamily} !important;
font-style:${style.fontStyle} !important;
background-color: ${style.background};
.markdown-body a {
color: ${style.links};
Expand Down Expand Up @@ -111,7 +112,7 @@ const VerticalAlignmentOptions = [
] as const;


let TextTmpComp = (function () {
let TextTmpComp = (function () {

const childrenMap = {
text: stringExposingStateControl(
Expand All @@ -123,7 +124,7 @@ let TextTmpComp = (function () {
horizontalAlignment: alignWithJustifyControl(),
verticalAlignment: dropdownControl(VerticalAlignmentOptions, "center"),
style: styleControl(TextStyle),
margin: MarginControl,
margin: MarginControl,
padding: PaddingControl,
};
return new UICompBuilder(childrenMap, (props) => {
Expand All @@ -145,7 +146,7 @@ let TextTmpComp = (function () {
.setPropertyViewFn((children) => {
return (
<>

<Section name={sectionNames.basic}>
{children.type.propertyView({
label: trans("value"),
Expand All @@ -160,7 +161,7 @@ let TextTmpComp = (function () {
{hiddenPropertyView(children)}
</Section>
)}

{["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
<>
<Section name={sectionNames.layout}>
Expand Down
Loading