{"id":2410,"date":"2021-11-09T07:24:55","date_gmt":"2021-11-08T22:24:55","guid":{"rendered":"https:\/\/nobunobu1717.site\/?p=2410"},"modified":"2021-11-09T07:24:55","modified_gmt":"2021-11-08T22:24:55","slug":"post-2410","status":"publish","type":"post","link":"https:\/\/nobunobu1717.site\/?p=2410","title":{"rendered":"\u3010React\u3011Chakra UI\u3067\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u306a\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<h2>\u6982\u8981<\/h2>\n<p>React\u306eUI\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308bChakra UI\u306b\u304a\u3044\u3066\u3001\u30b9\u30de\u30db\u3084\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u3067\u52d5\u7684\u306b\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5\u3002<\/p>\n\n\t<p style=\"color:#666;margin-bottom:5px;\">\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af<\/p>\n\t<div class=\"middle-ad\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\n\n<h3>\u5b9a\u756a\u30d1\u30bf\u30fc\u30f3<\/h3>\n<p>\u516c\u5f0f\u30da\u30fc\u30b8\u542b\u3081\u3001\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u5bfe\u5fdc\u306e\u65b9\u6cd5\u3068\u3057\u3066\u4e0b\u8a18\u306e\u3088\u3046\u306b\u914d\u5217\u3067\u5024\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5\u304c\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\u3088\u3046\u306a\u914d\u5217\u3092\u6307\u5b9a\u3059\u308b\u4e8b\u3067\u3001\u52d5\u7684\u306b\u5024\u3092\u5909\u66f4\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">&lt;Text fontSize={[\"20px\", \"36px\", \"46px\" ]}&gt;\u30bf\u30a4\u30c8\u30eb&lt;\/Text&gt;<\/pre>\n<p>\u3053\u306e\u65b9\u6cd5\u81ea\u4f53\u306f\u304a\u624b\u8efd\u3067\u4fbf\u5229\u306a\u306e\u3067\u3059\u304c\u3001\u8907\u6570\u306e\u8981\u7d20\u306b\u3053\u306e\u3088\u3046\u306a\u5024\u3092\u6307\u5b9a\u3059\u308b\u306e\u306f\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\t<p style=\"color:#666;margin-bottom:5px;\">\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af<\/p>\n\t<div class=\"middle-ad\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\n\n<h3>TextStyle\u306e\u6307\u5b9a<\/h3>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u30c6\u30fc\u30de\u8a2d\u5b9a\u3092\u4f5c\u6210\u3057\u3066\u3001TextStyle\u3068\u3044\u3063\u305f\u8981\u7d20\u3092\u5b9a\u7fa9\u3057\u3001fontSize\u306b\u914d\u5217\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">import { extendTheme } from \"@chakra-ui\/react\";\r\n\r\nconst theme = extendTheme({\r\n  textStyles: {\r\n    h1: {\r\n      fontSize: [\"25px\", \"40px\"], \/\/ \u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u306a\u8a2d\u5b9a\r\n      color: \"blue\",\r\n    },\r\n    h2: {\r\n      fontSize: \"24px\",\r\n      color: \"red\",\r\n    },\r\n    h3: {\r\n      fontSize: \"16px\",\r\n      color: \"orange\",\r\n    }\r\n  }\r\n});\r\nexport default theme;\r\n<\/pre>\n<p>\u3053\u306e\u30c6\u30fc\u30de\u3092ChakraProvider\u306b\u8aad\u307f\u8fbc\u307e\u305b\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">import * as React from \"react\";\r\nimport theme from \".\/Theme\";\r\n\r\nexport const App = () =&gt; (\r\n  &lt;ChakraProvider theme={theme}&gt;\r\n\u3000...\r\n  &lt;\/ChakraProvider&gt;\r\n);\r\n<\/pre>\n<p>\u3042\u3068\u306f\u3001textStyle\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u306a\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u304c\u6307\u5b9a\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3082\u3061\u308d\u3093\u30b5\u30a4\u30ba\u4ee5\u5916\u306e\u30d5\u30a9\u30f3\u30c8\u7cfb\u306e\u8a2d\u5b9a\u306b\u5bfe\u3057\u3066\u3082\u540c\u3058\u3088\u3046\u306a\u8a2d\u5b9a\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">&lt;Text textStyle=\"h1\"&gt;\u30bf\u30a4\u30c8\u30eb&lt;\/Text&gt;<\/pre>\n\n\t<p style=\"color:#666;margin-bottom:5px;\">\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af<\/p>\n\t<div class=\"middle-ad\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\n\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 React\u306eUI\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308bChakra UI\u306b\u304a\u3044\u3066\u3001\u30b9\u30de\u30db\u3084\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u3067\u52d5\u7684\u306b\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5\u3002 \u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af \u5b9a\u756a\u30d1\u30bf\u30fc\u30f3 \u516c\u5f0f\u30da\u30fc\u30b8\u542b\u3081\u3001\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u5bfe\u5fdc\u306e\u65b9\u6cd5 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2450,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22,47,16],"tags":[],"_links":{"self":[{"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/posts\/2410"}],"collection":[{"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2410"}],"version-history":[{"count":4,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/posts\/2410\/revisions"}],"predecessor-version":[{"id":2513,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/posts\/2410\/revisions\/2513"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=\/wp\/v2\/media\/2450"}],"wp:attachment":[{"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nobunobu1717.site\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}