import { jsx, jsxs, Fragment } from 'solid-jsx/jsx-runtime';

/*@jsxRuntime automatic @jsxImportSource solid-jsx*/
const toc = [];
function _createMdxContent(props) {
  const _components = Object.assign({
    p: "p",
    code: "code",
    pre: "pre",
    span: "span"
  }, props.components);
  return jsxs(Fragment, {
    children: [jsxs(_components.p, {
      children: [jsx(_components.code, {
        children: "<Dynamic>"
      }), " 태그는 데이터를 렌더링할 때 유용합니다. 네이티브 엘리먼트 문자열이나 컴포넌트 함수를 전달할 수 있으며, 제공된 나머지 props를 사용해 렌더링됩니다."]
    }), "\n", jsxs(_components.p, {
      children: ["이렇게 하면 여러 개의 ", jsx(_components.code, {
        children: "<Show>"
      }), " 또는 ", jsx(_components.code, {
        children: "<Switch>"
      }), " 컴포넌트를 작성하는 것보다 종종 더 간결합니다."]
    }), "\n", jsxs(_components.p, {
      children: ["이 예제에서 다음과 같은 ", jsx(_components.code, {
        children: "<Switch>"
      }), " 문을:"]
    }), "\n", jsx(_components.pre, {
      children: jsxs(_components.code, {
        className: "hljs language-jsx",
        children: ["<", jsx(_components.span, {
          className: "hljs-title class_",
          children: "Switch"
        }), " fallback={", jsx(_components.span, {
          className: "xml",
          children: jsxs(_components.span, {
            className: "hljs-tag",
            children: ["<", jsx(_components.span, {
              className: "hljs-name",
              children: "BlueThing"
            }), " />"]
          })
        }), "}>\n  ", jsxs(_components.span, {
          className: "xml",
          children: [jsxs(_components.span, {
            className: "hljs-tag",
            children: ["<", jsx(_components.span, {
              className: "hljs-name",
              children: "Match"
            }), " ", jsx(_components.span, {
              className: "hljs-attr",
              children: "when"
            }), "=", jsx(_components.span, {
              className: "hljs-string",
              children: "{selected()"
            }), " === ", jsx(_components.span, {
              className: "hljs-string",
              children: "'red'"
            }), "}>"]
          }), jsxs(_components.span, {
            className: "hljs-tag",
            children: ["<", jsx(_components.span, {
              className: "hljs-name",
              children: "RedThing"
            }), " />"]
          }), jsxs(_components.span, {
            className: "hljs-tag",
            children: ["</", jsx(_components.span, {
              className: "hljs-name",
              children: "Match"
            }), ">"]
          })]
        }), "\n  ", jsxs(_components.span, {
          className: "xml",
          children: [jsxs(_components.span, {
            className: "hljs-tag",
            children: ["<", jsx(_components.span, {
              className: "hljs-name",
              children: "Match"
            }), " ", jsx(_components.span, {
              className: "hljs-attr",
              children: "when"
            }), "=", jsx(_components.span, {
              className: "hljs-string",
              children: "{selected()"
            }), " === ", jsx(_components.span, {
              className: "hljs-string",
              children: "'green'"
            }), "}>"]
          }), jsxs(_components.span, {
            className: "hljs-tag",
            children: ["<", jsx(_components.span, {
              className: "hljs-name",
              children: "GreenThing"
            }), " />"]
          }), jsxs(_components.span, {
            className: "hljs-tag",
            children: ["</", jsx(_components.span, {
              className: "hljs-name",
              children: "Match"
            }), ">"]
          })]
        }), "\n</", jsx(_components.span, {
          className: "hljs-title class_",
          children: "Switch"
        }), ">\n"]
      })
    }), "\n", jsx(_components.p, {
      children: "아래와 같이 바꿀 수 있습니다:"
    }), "\n", jsx(_components.pre, {
      children: jsxs(_components.code, {
        className: "hljs language-jsx",
        children: ["<", jsx(_components.span, {
          className: "hljs-title class_",
          children: "Dynamic"
        }), " component={options[", jsx(_components.span, {
          className: "hljs-title function_",
          children: "selected"
        }), "()]} />\n"]
      })
    })]
  });
}
function MDXContent(props = {}) {
  const {wrapper: MDXLayout} = props.components || ({});
  return MDXLayout ? jsx(MDXLayout, Object.assign({}, props, {
    children: jsx(_createMdxContent, props)
  })) : _createMdxContent(props);
}

export { MDXContent as default, toc };
//# sourceMappingURL=lesson-0d6b568f.js.map
