mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
Updated InvalidComponents with Custom, InvalidIndex classes
This commit is contained in:
parent
2123ae6edd
commit
c56cebb812
@ -19,15 +19,32 @@ const InvalidSkeleton = (props) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const InvalidIndex = (props) => {
|
||||||
export default class Invalid extends React.Component{
|
return(
|
||||||
constructor(props){
|
<div className={styles.floatCardWrapper} bordered="false">
|
||||||
super(props)
|
<antd.Result>
|
||||||
|
Sorry but, We could not index this <antd.Tag style={{ marginLeft: "12px", lineHeight: "24px"}}>{props.messageProp1}</antd.Tag>
|
||||||
|
</antd.Result>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Custom = (props) => {
|
||||||
|
return(
|
||||||
|
<div className={styles.floatCardWrapper} style={props.style ?? null} >
|
||||||
|
<antd.Result status={props.status ?? "info"} title={props.title ?? ""}>
|
||||||
|
{props.message}
|
||||||
|
</antd.Result>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class Invalid extends React.Component{
|
||||||
render(){
|
render(){
|
||||||
const Components = {
|
const Components = {
|
||||||
skeleton: <InvalidSkeleton />
|
skeleton: <InvalidSkeleton {...this.props} />,
|
||||||
|
index: <InvalidIndex {...this.props} />,
|
||||||
|
custom: <Custom {...this.props} />
|
||||||
}
|
}
|
||||||
const type = this.props.type
|
const type = this.props.type
|
||||||
if (!type) {
|
if (!type) {
|
||||||
|
@ -12,3 +12,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.floatCardWrapper{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user