...
import {
getCommonCardWithHeader,
getLabel
} from "egov-ui-framework/ui-config/screens/specs/utils";
const screenConfig = {
uiFramework: "material-ui",
name: "mihyLoginScreenloginScreen",
components: {
mihyLoginGridloginGrid: {
uiFramework: "custom-atoms",
componentPath: "Container",
children: {
mihyEmptyRowemptyRow: {
uiFramework: "custom-atoms",
componentPath: "Item",
props: {
sm: 4
}
},
mihyLoginItemloginItem: {
uiFramework: "custom-atoms",
componentPath: "Item",
props: {
sm: 4,
xs: 12
},
children: {
mihyLoginCardloginCard: getCommonCardWithHeader(
{
mihyloginDivloginDiv: {
uiFramework: "custom-atoms",
componentPath: "Div",
props: {
className: "text-center"
},
children: {
mihyLoginUsernameloginUsername: {
uiFramework: "custom-molecules",
componentPath: "TextfieldWithIcon",
props: {
label: "Email",
margin: "normal",
fullWidth: true,
autoFocus: true,
required: true,
iconObj: {
position: "end",
iconName: "email"
}
},
required: true,
jsonPath: "body.mihyuser.username",
pattern: "^([a-zA-Z0-9@.])+$"
},
mihyLoginPasswordloginPassword: {
uiFramework: "custom-molecules",
componentPath: "TextfieldWithIcon",
props: {
label: "Password",
type: "password",
margin: "normal",
fullWidth: true,
required: true,
iconObj: { position: "end", iconName: "lock" }
},
jsonPath: "body.mihyuser.password",
required: true,
pattern: "^([a-zA-Z0-9!])+$"
},
mihyBreakOnebreakOne: {
uiFramework: "custom-atoms",
componentPath: "Break"
},
mihyBreakTwobreakTwo: {
uiFramework: "custom-atoms",
componentPath: "Break"
},
mihyLoginButtonloginButton: {
componentPath: "Button",
props: {
color: "primary",
fullWidth: true
},
children: {
mihyLoginButtonTextloginButtonText: getLabel({label:"Let's go"})
}
}
}
}
},
{
mihyLoginHeaderloginHeader: {
componentPath: "Typography",
children: {
mihyLoginHeaderTextloginHeaderText: getLabel({label:"Login"})
},
props: {
align: "center",
variant: "title",
style: {
color: "white"
}
}
}
}
)
}
}
}
}
}
};
export default screenConfig;
...
How to run the component and manage the routes in the framework?
- There is no need of writing routes for each page/component within the framework
- Framework uses a generic routing based on the location of spec file inside the ui-config/screen/specs, Which is completely taken care by the screenInterface component.
page with menu
http://localhost:<port-name>/landing/egov-ui-framework/<folder-name>/<file-name>
eg:- http://localhost:3000/landing/egov-ui-framework/auth/login
...