UNPKG

@gravel-form/blueprintjs

Version:

A flexible middlewares driven json schema form with Blueprintjs

1 lines 883 B
{"version":3,"sources":["middlewares/FieldsetTemplateMw.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAYvE,CAAC;AAEF,eAAe,kBAAkB,CAAC","file":"FieldsetTemplateMw.d.ts","sourcesContent":["import * as React from 'react';\nimport { FormMiddlewareProps } from '../core';\n\nexport const FieldsetTemplateMw: React.ComponentType<FormMiddlewareProps> = (props) => {\n const { schema, next } = props;\n\n if (typeof schema === 'boolean' || !(schema.type === 'object' || schema.type === 'array')) return next(props);\n const title = schema.title;\n return (\n <>\n {title && <h3>{title}</h3>}\n {schema.description && <p className=\"bp3-text-muted\">{schema.description}</p>}\n {next(props)}\n </>\n );\n};\n\nexport default FieldsetTemplateMw;\n"]}