<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ayobami Adejumo</title>
    <description>The latest articles on DEV Community by Ayobami Adejumo (@aayostem).</description>
    <link>https://dev.to/aayostem</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F957468%2Fa4e029ec-7612-4da9-9d62-0dfc535583b4.png</url>
      <title>DEV Community: Ayobami Adejumo</title>
      <link>https://dev.to/aayostem</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aayostem"/>
    <language>en</language>
    <item>
      <title>Git Quick Reference | The Comprehensive Guide to Git</title>
      <dc:creator>Ayobami Adejumo</dc:creator>
      <pubDate>Tue, 02 May 2023 18:53:33 +0000</pubDate>
      <link>https://dev.to/aayostem/git-quick-reference-the-comprehensive-guide-to-git-1loe</link>
      <guid>https://dev.to/aayostem/git-quick-reference-the-comprehensive-guide-to-git-1loe</guid>
      <description>&lt;p&gt;Git is a Version Control System. A version control system is a software designed to record changes within one or more files over time. &lt;br&gt;
When developers work on a project, different files are created and changes are made continuously to parts of the code. As the project grows, some of the code results in conflict. Git enables us to roll back, revert or cancel pending changes within one or more files. Git also enables us to compare the changes made to the different versions of a project. Having understood the importance of git, let's dive in&lt;/p&gt;
&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;p&gt;If you don't have git already installed on your machine, you can download the latest version from the git-scm website &lt;a href="https://git-scm.com/downloads" rel="noopener noreferrer"&gt;https://git-scm.com/downloads&lt;/a&gt; according to the version of your operating system - Windows, Mac, or Linux.&lt;br&gt;
if you're running a Windows operating system, download the Windows version and go to the DOWNLOAD folder in file explorer.&lt;br&gt;
Now double-click to install and follow the prompt. once installed, let's proceed to set up.&lt;/p&gt;
&lt;h3&gt;
  
  
  Configuration
&lt;/h3&gt;

&lt;p&gt;You can confirm if you correctly installed git with the &lt;code&gt;git --version&lt;/code&gt; On confirmation, let's proceed to configure our name and email.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name "firstname lastname"
git config --global user.email "firstname@email.com"
#check this 
git config --global --list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Getting Started
&lt;/h3&gt;

&lt;p&gt;To learn the basic git commands by practice, open the terminal of a text editor such as Vscode and practice with the following commands.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git init&lt;/code&gt;&lt;br&gt;
Initialize a new git repo in the current working directory. Without this command, most of the commands below won't work.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git clone [https://yourremoterepo...]&lt;/code&gt;&lt;br&gt;
This command helps to download a project from a remote repository. git clone copies the entire repository including branches and commit&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git status&lt;/code&gt;&lt;br&gt;
Displays the state of the working directory. It displays the files which are staged, unstaged or untracked. This command doesn't make any changes or modify any file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git add filename&lt;/code&gt;&lt;br&gt;
Add file from the working directory to the staging area&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git add .&lt;/code&gt;&lt;br&gt;
recursive add lets you add all untracked files in the working directory to the staging area.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git commit -m "enter your commit message here"&lt;/code&gt;&lt;br&gt;
Create a new commit from changes added to the staging area. The commit must have a message!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git rm [filename]&lt;/code&gt;&lt;br&gt;
Remove the file from the working directory and staging area.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reviewing Commit History
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ git log&lt;/code&gt;&lt;br&gt;
Used to view the history of committed changes within a repository. git log displays the history of everything.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git log --oneline --graph --decorate&lt;/code&gt;&lt;br&gt;
Display a text-based graphical representation of the commit history. It shows an overview with reference labels and a history graph.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git show commit-id&lt;/code&gt;&lt;br&gt;
Show commit log with information such as author, date, and diff output&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git diff&lt;/code&gt;&lt;br&gt;
show changes between the working directory and the staging area. This helps you track and compare the various changes you've made to code.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git diff --staged [file]&lt;/code&gt;&lt;br&gt;
Shows any changes between the staging area and the repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  Revert or Undo Changes
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;git checkout [filename]&lt;/code&gt;&lt;br&gt;
Discard changes in the working directory. This operation is unrecoverable.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git reset commit-id&lt;/code&gt;&lt;br&gt;
Revert your repository to a previously known working state.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git revert&lt;/code&gt;&lt;br&gt;
Undo changes to a repository's commit history&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git revert [commit sha]&lt;/code&gt;&lt;br&gt;
Create a new commit, reverting changes from the specified commit.&lt;br&gt;
It generates an inversion of changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Git branching model
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ git branch -a&lt;/code&gt;&lt;br&gt;
List all local branches in a repository. With -a: show all branches (with remote).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git branch [branch_name]&lt;/code&gt;&lt;br&gt;
Create a new branch, referencing the current HEAD.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git checkout [branch_name]&lt;/code&gt;&lt;br&gt;
Switch the working directory to the specified branch.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git checkout -b [branch_name]&lt;/code&gt;&lt;br&gt;
Create a new branch and switch the working directory to the new branch.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git merge [branchname]&lt;/code&gt;&lt;br&gt;
Join specified [branchname] into your current branch (the one&lt;br&gt;
you are on currently).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git branch -d [branchname]&lt;/code&gt;&lt;br&gt;
Remove the selected branch, if it is already merged into any other.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git reflog&lt;/code&gt;&lt;br&gt;
List operations (e.g. checkouts or commits) made on the local repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tagging
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ git tag&lt;/code&gt;&lt;br&gt;
List all tags.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git tag [tagname]&lt;/code&gt;&lt;br&gt;
Create a tag reference named name for the current commit.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git tag -d [tagname]&lt;/code&gt;&lt;br&gt;
Remove a tag from the local repository&lt;/p&gt;

&lt;h3&gt;
  
  
  Synchronizing repositories
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ git fetch [remote]&lt;/code&gt;&lt;br&gt;
Download changes from the remote, but not update tracking branches.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git fetch --prune [remote]&lt;/code&gt;&lt;br&gt;
Delete remote Refs that were removed from the remote repository.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git pull [remote]&lt;/code&gt;&lt;br&gt;
Fetch changes from the remote and merge the current branch with its upstream.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git push [--tags] [remote]&lt;/code&gt;&lt;br&gt;
Push local changes to the remote. Use --tags to push tags.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stashing
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$ git stash&lt;/code&gt;&lt;br&gt;
Put current changes in your working directory into the stash for later use.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git stash pop&lt;/code&gt;&lt;br&gt;
Apply stored stash content into the working directory, and clear stash.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git stash drop&lt;/code&gt;&lt;br&gt;
Delete a specific stash from all your previous stashes&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Full Guide: How to Build a UI Component Library</title>
      <dc:creator>Ayobami Adejumo</dc:creator>
      <pubDate>Sun, 06 Nov 2022 23:10:42 +0000</pubDate>
      <link>https://dev.to/aayostem/full-guide-how-to-build-a-ui-component-library-59ho</link>
      <guid>https://dev.to/aayostem/full-guide-how-to-build-a-ui-component-library-59ho</guid>
      <description>&lt;p&gt;The trees that are slow bear the best of fruits. We’ve all heard this phrase thousands of times, but can this be said of modern businesses and technologies where products are shipped everyday?&lt;/p&gt;

&lt;p&gt;In a constantly evolving world, you can definitely bear good fruits at a slower pace but there’s no guarantee of being the best. Infact, launching too late has been a major business killer.&lt;/p&gt;

&lt;p&gt;Therefore, as a developer you should try to eliminate or substitute your less important tasks to focus most on the high-value tasks.&lt;/p&gt;

&lt;h4&gt;
  
  
  One area where developers spend a lot of time but ideally they shouldn’t (initially) is the styling of their web app.
&lt;/h4&gt;

&lt;p&gt;Writing CSS code from scratch can be a beautiful experience but if you’re an organization or startup hoping to launch products sooner and faster, writing repetitive css code is not the best. This is the reason for the development of design systems and UI components libraries.&lt;/p&gt;

&lt;p&gt;However, you need to first evaluate your need so that you can choose between a ready made UI components or building a custom UI library from scratch. Sometimes, a custom component library is an overkill and you’re much better off using ready-made UI components.&lt;/p&gt;

&lt;p&gt;if you are an organisation or a startup looking to create a visual identity for your company (think big companies like Netflix, Amazon, Uber) and can do so without straining your budget, go for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where do we start building?
&lt;/h2&gt;

&lt;p&gt;Numerous sectors such as Architecture or Industrial Design have developed smart modular systems for manufacturing extremely complex objects like airplanes, ships, and skyscrapers. That is, these complex objects are made up of multiple building blocks that can be put together to form a bigger entity.&lt;/p&gt;

&lt;p&gt;Inspired by this, Atomic Design was proposed by Brad Frost in 2013 as a system that involves breaking down a website or web application into its basic components so that they are reusable throughout the site. Due to new devices with new screen sizes, that are getting released each year, creating pixel-perfect design gets harder if no systems are put in place&lt;/p&gt;

&lt;p&gt;Atomic Design, introduces a methodology for creating scalable systems, reusable components as well as design systems. There are five distinct levels in atomic design&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Atoms&lt;/li&gt;
&lt;li&gt;Molecules&lt;/li&gt;
&lt;li&gt;Organism&lt;/li&gt;
&lt;li&gt;Templates&lt;/li&gt;
&lt;li&gt;Pages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Atoms - represent the smallest entity in UI elements and they can’t be broken down any further examples of an atom include button, input, label.&lt;/p&gt;

&lt;p&gt;Molecules - Molecules are groups of atoms bonded together that take on distinct new properties. For instance, a profile molecule is the combination of avatar atom with name and title labels&lt;/p&gt;

&lt;p&gt;Organism - Organisms are more complex UI components composed of groups of molecules and/or atoms header organism;&lt;/p&gt;

&lt;p&gt;Templates - Templates are pages without real content.&lt;/p&gt;

&lt;p&gt;Pages - Pages are instances of templates that demonstrate the final UI looks like and with real data and contents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a Monorepository
&lt;/h2&gt;

&lt;p&gt;We'll start by setting up a monorepository. &lt;/p&gt;

&lt;p&gt;A monorepo is a version-controlled code repository that holds many projects with well defined relationships. While these projects may be related, they are often logically independent and run by different teams.&lt;/p&gt;

&lt;p&gt;In this case, the monorepo will contain scss package, react, vue and angular packages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir seraph-design-system
cd seraph-design-system
yarn init -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;proceed to setup your workspace&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"private":"true",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can check the &lt;a href="https://github.com/janto-pee/Seraph-Design-System" rel="noopener noreferrer"&gt;github repository&lt;/a&gt; for project dependencies. Proceed to install and configure lerna.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add --dev lerna
yarn lerna --init

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;add "useWorspaces": "true" and "stream":"true"&lt;br&gt;
By now, your lerna file should look like;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "$schema": "node_modules/lerna/schemas/lerna-schema.json",
  "useWorkspaces": true,
  "version": "0.0.0",
  "stream": true
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;add worskspaces, dev and build script to package.json;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
    "build": "yarn lerna run build",
    "dev": "yarn lerna run dev"
  },
  "workspaces": {
    "packages": [
      "packages/**",
      "playground/**"
    ]
  },
  "devDependencies": {
    "lerna": "^6.0.1",
    "process": "^0.11.10"
  }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;let's create a package structure&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup Your Package structure in the root
&lt;/h2&gt;

&lt;p&gt;in the root directory - seraph-design-system&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir packages
cd packages

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;create a directory for react, vue, and scss. You can include angular too.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- node_modules/
- packages/
  - react
  - scss
  - vue
- package.json
- lerna.json
- .gitignore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;let's create our css architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  SCSS Package
&lt;/h2&gt;

&lt;p&gt;To keep the css architecture modular, it’s important to break the code into smaller parts.&lt;/p&gt;

&lt;p&gt;Multiple files make the code easier to read, navigate and track. To do that, a CSS preprocessor – such as Sass, LESS or Stylus – or a post-processor – such as PostCSS – is the way to go.&lt;/p&gt;

&lt;p&gt;Preprocessors enhance the capabilities of CSS authoring, introducing new features such as variables, mixins and much more. To work with separate files, your code will be divided into partials and imported on a main.scss file, that will compile everything into a single .css file.&lt;/p&gt;

&lt;p&gt;3 benefit of using a preprocessor&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;breaking the code into smaller chunks and separating them by scope;&lt;/li&gt;
&lt;li&gt;coding components in a independent and encapsulated manner;&lt;/li&gt;
&lt;li&gt;naming CSS selectors according to their purpose and relationship with each other.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each component should be encapsulated on its own file. For consistency reasons, it’s a good practice to use the same name for the file and main selector&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd packages/scss
mkdir src
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now create a file global.scss in src&lt;br&gt;
in addition to the file, create four folders in src - atoms, molecules, foundation, organisms;&lt;/p&gt;

&lt;p&gt;cd into the foundation folder and create your _variables.scss, _typography, _mixins.scss, _all.scss, _colors.scss.&lt;/p&gt;

&lt;p&gt;By now, your folder structure should be like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  - scss
    - src/
        global.scss
        - atoms/
        - foundation/
            _all.scss
            _color.scss
            _mixins.scss
            _typography.scss
            _variables.scss

        - molecules/
        -organisms/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As the names of the files suggest, create all variables as specified in your design (figma) into the _variables.scss.&lt;/p&gt;

&lt;p&gt;Proceed to create default colors and typography in their respective files. _mixins.scss should contain reuable styles such as breakpoint sizes.&lt;/p&gt;

&lt;p&gt;You can checkout the &lt;a href="https://github.com/janto-pee/Seraph-Design-System" rel="noopener noreferrer"&gt;github&lt;/a&gt; repository for more information on this file&lt;/p&gt;

&lt;p&gt;import the four files (_variables.scss, _color.scss, _mixins.scss, _typography.scss) into the _all.scss&lt;/p&gt;

&lt;p&gt;Then, import the _all.scss into the global.scss (in src) to make it available to gulp-sass for compilation.&lt;/p&gt;

&lt;h4&gt;
  
  
  Install devDepencies for Scss package
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd package/scss
yarn init -y

yarn add --dev normalize-scss gulp gulp-sass stylelint prettier stylelint-config-sass-guidelines  stylelint-config-prettier stylelint-prettier

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  let configure normalize-scss and other devDependencies
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd scss/src
mkdir normalize

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;create two files in the normalize _root.scss and _reset.scss&lt;/p&gt;

&lt;p&gt;The _reset.scss contains import from normalize-scss&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@import "node_modules/normalize-scss/sass/normalize/import-now";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The _root.scss contains scss root such as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:root{
  ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;import these two files (_root.scss and _reset.scss) into the global.scss&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- node_modules/
- packages/
  - scss
    - lib/
    - node_modules/
    - src/
        global.scss
        - atoms/
            Button.scss
            Text.scss
            Input.scss
        - foundation/
            _all.scss
            _color.scss
            _mixins.scss
            _typography.scss
            _variables.scss
        - molecules/
            inputfield.scss
    - package.json
    - .stylelintrc.json
    - gulpfile.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;create a .styleintrc.json file and gulpfile.js file.&lt;/p&gt;

&lt;p&gt;now run gulp watch.&lt;br&gt;
you should have your compiled files in the dist folder;&lt;br&gt;
congrats.&lt;/p&gt;
&lt;h2&gt;
  
  
  React UI library Component
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd packages/react
yarn init -y
yarn add --dev react typescript @types/react rollup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;since we're building a library, rollup is our preferred bundler.&lt;br&gt;
Therefore, create a tsconfig.json and rollup.config.js file&lt;/p&gt;

&lt;p&gt;now make atomic folders like we did for the scss package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- node_modules/
- packages/
  - react
    - lib/
    - node_modules/
    - src/
        - atoms/
        - molecules/
        - organisms/
    - package.json
    - rollup.config.js
    - tsconfig.json

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;set up dev and build script&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
    "build": "rollup -c",
    "dev": "yarn build --watch"
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  creating our First Component;
&lt;/h3&gt;

&lt;p&gt;create a Heading components.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd src/atoms
mkdir Button
cd Button
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;create two files Heading.tsx and index.ts&lt;/p&gt;

&lt;p&gt;atoms/Heading/Heading.tsx&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';

interface HeadingProps {
    title: string
    color?: string
}

const Heading: React.FunctionComponent&amp;lt;HeadingProps&amp;gt;({title, color}) =&amp;gt; {
    return &amp;lt;h1 style={{color: color}} class='header'&amp;gt;{title}&amp;lt;/h1&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in the atoms/Heading/index.ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export {default} from './Heading'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in the src/index.ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Heading from './atoms/Heading';
export {
    Heading;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your react package structure looks like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- node_modules/
- packages/
  - react
    - lib/
    - node_modules/
    - src/
        - index.ts
        - atoms/
            - Heading/
                - Heading.ts
                - index.ts
        - molecules
        -organisms
    - package.json
    - rollup.config.js
    - tsconfig.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;now run yarn build to build your component.&lt;/p&gt;

</description>
      <category>design</category>
      <category>react</category>
      <category>vue</category>
      <category>css</category>
    </item>
  </channel>
</rss>
