<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Petr Reshetin on Medium]]></title>
        <description><![CDATA[Stories by Petr Reshetin on Medium]]></description>
        <link>https://medium.com/@petrreshetin?source=rss-3ed7f3479bd6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*5NEtg0Ijig7pCTy8.jpg</url>
            <title>Stories by Petr Reshetin on Medium</title>
            <link>https://medium.com/@petrreshetin?source=rss-3ed7f3479bd6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 22:26:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@petrreshetin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Status Component Example with Vue.js]]></title>
            <link>https://medium.com/@petrreshetin/vue-js-status-component-example-32f9a22f55f0?source=rss-3ed7f3479bd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/32f9a22f55f0</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[Petr Reshetin]]></dc:creator>
            <pubDate>Mon, 22 May 2017 20:05:03 GMT</pubDate>
            <atom:updated>2017-05-22T20:22:32.602Z</atom:updated>
            <content:encoded><![CDATA[<p>When developing backoffice admin panel, you often need to create pages of different status labels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yWUUchfp5_Nwypz2THMImA.gif" /><figcaption>All above blocks are using the same &lt;status&gt; component</figcaption></figure><p>Would not it be cool, if you just paste &lt;status&gt; html element, that would have:</p><ul><li>a formatting of a label html attribute;</li><li>have a toggle status functionality, with toggle url provided.</li></ul><p>Modern JS frameworks like Vue.js, React.js, Angular.js easilly allow to create this &lt;status&gt; element.</p><p>Here is how to use &lt;status&gt; component. Just drop it anywhere in your template file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/60e11a91bc5607cc822b1046cf129eeb/href">https://medium.com/media/60e11a91bc5607cc822b1046cf129eeb/href</a></iframe><h3>Status Component Code</h3><p>Here is Vue.js 2 component, that would achieve such functionality. It is just single Status.vue file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e02812b23c31ed39451e674ff9c1d7c4/href">https://medium.com/media/e02812b23c31ed39451e674ff9c1d7c4/href</a></iframe><p>Based on status text, the component matches label color:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cdb4385663c658967dfc2b77ef7b0982/href">https://medium.com/media/cdb4385663c658967dfc2b77ef7b0982/href</a></iframe><p>Hope this helps someone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32f9a22f55f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>