adds new property display component
This commit is contained in:
16
src/core/components/property.jsx
Normal file
16
src/core/components/property.jsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import React from "react"
|
||||
import PropTypes from "prop-types"
|
||||
|
||||
export const Property = ({ propKey, propVal, propStyle }) => {
|
||||
return (
|
||||
<span style={ propStyle }>
|
||||
<br />{ propKey }: { String(propVal) }</span>
|
||||
)
|
||||
}
|
||||
Property.propTypes = {
|
||||
propKey: PropTypes.string,
|
||||
propVal: PropTypes.any,
|
||||
propStyle: PropTypes.object
|
||||
}
|
||||
|
||||
export default Property
|
||||
@@ -52,6 +52,7 @@ import EnumModel from "core/components/enum-model"
|
||||
import ObjectModel from "core/components/object-model"
|
||||
import ArrayModel from "core/components/array-model"
|
||||
import PrimitiveModel from "core/components/primitive-model"
|
||||
import Property from "core/components/property"
|
||||
import TryItOutButton from "core/components/try-it-out-button"
|
||||
import VersionStamp from "core/components/version-stamp"
|
||||
|
||||
@@ -106,6 +107,7 @@ export default function() {
|
||||
ObjectModel,
|
||||
ArrayModel,
|
||||
PrimitiveModel,
|
||||
Property,
|
||||
TryItOutButton,
|
||||
Markdown,
|
||||
BaseLayout,
|
||||
|
||||
Reference in New Issue
Block a user