-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,348 changed files
with
343,924 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"title":"Basic","meta":{"title":"Basic","description":"\n<p>The simple usage is to wrap your components direcly with Affix component.</p>\n","order":"0"},"codes":{"jsx":"import { Affix, Button } from '@alifd/next';\n\nReactDOM.render(<div className=\"custom-affix-wrapper\">\n <Affix>\n <Button type=\"secondary\">Affixed Button</Button>\n </Affix>\n</div>, mountNode);\n","css":".custom-affix-wrapper {\n padding: 40px 0;\n}\n"},"body":"\n````jsx\nimport { Affix, Button } from '@alifd/next';\n\nReactDOM.render(<div className=\"custom-affix-wrapper\">\n <Affix>\n <Button type=\"secondary\">Affixed Button</Button>\n </Affix>\n</div>, mountNode);\n````\n\n````css\n.custom-affix-wrapper {\n padding: 40px 0;\n}\n````","html":"<script>(function(){\"use strict\";\n\nvar _next = require(\"@alifd/next\");\n\nReactDOM.render(React.createElement(\n \"div\",\n { className: \"custom-affix-wrapper\" },\n React.createElement(\n _next.Affix,\n null,\n React.createElement(\n _next.Button,\n { type: \"secondary\" },\n \"Affixed Button\"\n )\n )\n), mountNode);})()</script><div class=\"highlight\"><pre class=\"language-jsx\"><code class=\"language-jsx\"><span class=\"token keyword\">import</span> <span class=\"token punctuation\">{</span> Affix<span class=\"token punctuation\">,</span> Button <span class=\"token punctuation\">}</span> <span class=\"token keyword\">from</span> <span class=\"token string\">'@alifd/next'</span><span class=\"token punctuation\">;</span>\n\nReactDOM<span class=\"token punctuation\">.</span><span class=\"token function\">render</span><span class=\"token punctuation\">(</span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"><</span>div</span> <span class=\"token attr-name\">className</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>custom-affix-wrapper<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">\n </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"><</span>Affix</span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">\n </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"><</span>Button</span> <span class=\"token attr-name\">type</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>secondary<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">Affixed Button</span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"></</span>Button</span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">\n </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"></</span>Affix</span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">\n</span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"></</span>div</span><span class=\"token punctuation\">></span></span><span class=\"token punctuation\">,</span> mountNode<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div><style type=\"text/css\">.custom-affix-wrapper {\n padding: 40px 0;\n}</style><div class=\"highlight\"><pre class=\"language-css\"><code class=\"language-css\"><span class=\"token selector\">.custom-affix-wrapper</span> <span class=\"token punctuation\">{</span>\n <span class=\"token property\">padding</span><span class=\"token punctuation\">:</span> 40px 0<span class=\"token punctuation\">;</span>\n<span class=\"token punctuation\">}</span></code></pre></div>"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"title":"基本","meta":{"title":"基本","description":"\n<p>默认情况下,Affix 的默认目标容器元素是整个 <code>window</code>,并且 <code>offsetTop = 0</code>,\n也就意味着当页面往下滚动时,当 Affix 元素接触到浏览器边框时,此时会将 Affix 钉住。</p>\n","order":"0"},"codes":{"jsx":"import { Affix, Button } from '@alifd/next';\n\nReactDOM.render(<div className=\"custom-affix-wrapper\">\n <Affix>\n <Button type=\"secondary\">Affixed Button</Button>\n </Affix>\n</div>, mountNode);\n","css":".custom-affix-wrapper {\n padding: 40px 0;\n}\n"},"body":"\n\n````jsx\nimport { Affix, Button } from '@alifd/next';\n\nReactDOM.render(<div className=\"custom-affix-wrapper\">\n <Affix>\n <Button type=\"secondary\">Affixed Button</Button>\n </Affix>\n</div>, mountNode);\n````\n\n````css\n.custom-affix-wrapper {\n padding: 40px 0;\n}\n````","html":"<script>(function(){\"use strict\";\n\nvar _next = require(\"@alifd/next\");\n\nReactDOM.render(React.createElement(\n \"div\",\n { className: \"custom-affix-wrapper\" },\n React.createElement(\n _next.Affix,\n null,\n React.createElement(\n _next.Button,\n { type: \"secondary\" },\n \"Affixed Button\"\n )\n )\n), mountNode);})()</script><div class=\"highlight\"><pre class=\"language-jsx\"><code class=\"language-jsx\"><span class=\"token keyword\">import</span> <span class=\"token punctuation\">{</span> Affix<span class=\"token punctuation\">,</span> Button <span class=\"token punctuation\">}</span> <span class=\"token keyword\">from</span> <span class=\"token string\">'@alifd/next'</span><span class=\"token punctuation\">;</span>\n\nReactDOM<span class=\"token punctuation\">.</span><span class=\"token function\">render</span><span class=\"token punctuation\">(</span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"><</span>div</span> <span class=\"token attr-name\">className</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>custom-affix-wrapper<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">\n </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"><</span>Affix</span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">\n </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"><</span>Button</span> <span class=\"token attr-name\">type</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>secondary<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">Affixed Button</span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"></</span>Button</span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">\n </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"></</span>Affix</span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">\n</span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\"></</span>div</span><span class=\"token punctuation\">></span></span><span class=\"token punctuation\">,</span> mountNode<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div><style type=\"text/css\">.custom-affix-wrapper {\n padding: 40px 0;\n}</style><div class=\"highlight\"><pre class=\"language-css\"><code class=\"language-css\"><span class=\"token selector\">.custom-affix-wrapper</span> <span class=\"token punctuation\">{</span>\n <span class=\"token property\">padding</span><span class=\"token punctuation\">:</span> 40px 0<span class=\"token punctuation\">;</span>\n<span class=\"token punctuation\">}</span></code></pre></div>"} |
Oops, something went wrong.