( node: GroupNode, settings: TailwindSettings, )
| 102 | }; |
| 103 | |
| 104 | const tailwindGroup = async ( |
| 105 | node: GroupNode, |
| 106 | settings: TailwindSettings, |
| 107 | ): Promise<string> => { |
| 108 | // Ignore the view when size is zero or less or if there are no children |
| 109 | if (node.width < 0 || node.height <= 0 || node.children.length === 0) { |
| 110 | return ""; |
| 111 | } |
| 112 | |
| 113 | const builder = new TailwindDefaultBuilder(node, settings) |
| 114 | .blend() |
| 115 | .size() |
| 116 | .position(); |
| 117 | |
| 118 | if (builder.attributes || builder.style) { |
| 119 | const attr = builder.build(""); |
| 120 | const generator = await tailwindWidgetGenerator(node.children, settings); |
| 121 | return `\n<div${attr}>${indentString(generator)}\n</div>`; |
| 122 | } |
| 123 | |
| 124 | return await tailwindWidgetGenerator(node.children, settings); |
| 125 | }; |
| 126 | |
| 127 | export const tailwindText = ( |
| 128 | node: TextNode, |
no test coverage detected