{"version":3,"file":"Italic.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/formatting/Italic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAsBtD,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,mBAAmB,CAA2B,IAAI,CAAC,CAAC","sourcesContent":["import type { JsonObject, SnapElement, SnapsChildren } from '../../component';\nimport { createSnapComponent } from '../../component';\n\n/**\n * The children of the {@link Italic} component.\n */\nexport type ItalicChildren = SnapsChildren<\n  | string\n  // We have to specify the type here to avoid a circular reference.\n  | SnapElement<JsonObject, 'Bold'>\n>;\n\n/**\n * The props of the {@link Italic} component.\n *\n * @property children - The text to display in italic. This should be a string\n * or an array of strings.\n * @category Component Props\n */\nexport type ItalicProps = {\n  children: ItalicChildren;\n};\n\nconst TYPE = 'Italic';\n\n/**\n * An italic component, which is used to display text in italic. This component\n * can only be used as a child of the {@link Text} component.\n *\n * @param props - The props of the component.\n * @param props.children - The text to display in italic. This should be a\n * string or an array of strings.\n * @returns An italic element.\n * @example\n * <Text>\n *   Hello <Italic>world</Italic>!\n * </Text>\n * @category Components\n */\nexport const Italic = createSnapComponent<ItalicProps, typeof TYPE>(TYPE);\n\n/**\n * An italic element.\n *\n * @see {@link Italic}\n * @category Elements\n */\nexport type ItalicElement = ReturnType<typeof Italic>;\n"]}