// url=?node-id=18787-39302 // source=https://github.com/planview-ds/react-pvds/blob/master/packages/pv-form/src/field/index.tsx // component=Field import figma from 'figma' const error = figma.selectedInstance.getEnum('State', { Error: (function () { const nestedLayer0 = figma.selectedInstance.findInstance( 'Form inline message' ) return { content: nestedLayer0.type !== 'ERROR' ? nestedLayer0.findText('Label').__render__() : undefined, } })(), Normal: { content: undefined }, Warning: { content: undefined }, }) const warning = figma.selectedInstance.getEnum('State', { Warning: (function () { const nestedLayer1 = figma.selectedInstance.findInstance( 'Form inline message' ) return { content: nestedLayer1.type !== 'ERROR' ? nestedLayer1.findText('Label').__render__() : undefined, } })(), Normal: { content: undefined }, Error: { content: undefined }, }) export default { id: 'Field', imports: ["import { Field } from '@planview/pv-form'"], example: figma.code` {({ id, ...fieldProps }) => } `, metadata: { nestable: true }, }