Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@quintype/arrow
Advanced tools
š¹ React Component library for Malibu & Page Builder based on the Arrow Design System
Arrow consists of a set of pre styled components based on Malibu's implementation of the Atomic Design Methodology.
Consumers of the library can import Atoms, Molecules and Rows as required by the layout. This includes composible story cards which can accept custom components amidst other pre defined atoms.
The storybook for arrow components can be found here
npm install --save @quintype/arrow
Import the styles to the root stylesheet (SASS loader required):
@import "@quintype/arrow/dist/app.scss";
Import the required component from the library:
import { ThreeColGrid } from "@quintype/arrow";
const MyComponent = () => (
<>
{/* Some Component Logic */}
<ThreeColGrid collection={collection} config={contextConfig} />
</>
);
The context config consists of the params for the component, the structure is as such:
const contextConfig = {
theme: "#ffffff",
isborder: true,
showSection: true,
showAuthorTime: true,
showSubheadline: true
};
Arrow's styling follows the Malibu's convention of using CSS modules for it's internal component styling.
All the component styling is governed by global style variables, as defined in the earlier imported app.scss
, which can be overridden when required. These include the ability to change the colour palette, spacing, font scales, font families, line height and font weights.
if you want to set of CSS rules that resets the styling of all HTML elements to a consistent baseline, install reset using npm install reset-css
and import @import 'reset-css'
in your project.
you can follow https://www.npmjs.com/package/reset-css
.
:root {
/* Colour Palette */
--arrow-c-brand1: #b80002;
--arrow-c-brand2: #2f81cd;
--arrow-c-brand3: #4860bc;
--arrow-c-brand4: #f6f8ff;
--arrow-c-accent1: #2fd072;
--arrow-c-accent2: #f5a623;
--arrow-c-accent3: #ff214b;
--arrow-c-mono1: #0d0d0d;
--arrow-c-mono2: #333333;
--arrow-c-mono3: #636363;
--arrow-c-mono4: #797979;
--arrow-c-mono5: #d1d1d1;
--arrow-c-mono6: #e9e9e9;
--arrow-c-mono7: #f9f9f9;
--arrow-c-invert-mono1: #f9f9f9;
--arrow-c-invert-mono2: #e9e9e9;
--arrow-c-invert-mono3: #d1d1d1;
--arrow-c-invert-mono4: #797979;
--arrow-c-invert-mono5: #636363;
--arrow-c-invert-mono6: #333333;
--arrow-c-invert-mono7: #0d0d0d;
--arrow-c-dark: #0d0d0d;
--arrow-c-light: #ffffff;
/* Spacing */
--arrow-spacing-xs: 4px;
--arrow-spacing-s: 8px;
--arrow-spacing-m: 16px;
--arrow-spacing-l: 24px;
--arrow-spacing-xl: 32px;
/* Font Scale */
--arrow-fs-tiny: 14px;
--arrow-fs-xxs: 15px;
--arrow-fs-xs: 16px;
--arrow-fs-s: 18px;
--arrow-fs-m: 20px;
--arrow-fs-l: 24px;
--arrow-fs-xl: 26px;
--arrow-fs-xxl: 30px;
--arrow-fs-huge: 32px;
--arrow-fs-jumbo: 54px;
/* Font Family */
--arrow-typeface-primary: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
--arrow-typeface-secondary: Verdana, Geneva, Tahoma, sans-serif;
/* Line height */
--arrow-lh-1: 1;
--arrow-lh-2: 1.2;
--arrow-lh-3: 1.3;
--arrow-lh-4: 1.4;
--arrow-lh-5: 1.5;
/* Font Weight */
--arrow-fw-light: 300;
--arrow-fw-normal: 400;
--arrow-fw-semi-bold: 600;
--arrow-fw-bold: 700;
}
Arrow follows atomic design principles. Components are splits into Atoms, Molecules and Rows (Similar to Templates in atomic design).
Each leaf folder follows below structure:
../HeroImage/
- index.js # A react component with styles.
- hero-image.m.css # CSS Module file
- README.md # Documentation of this component.
- stories.js # Code to inject multiple variations of
the component to story book.
To release a new arrow version, run the below command
./publish
To develop a new component in arrow/change a current one, these are the steps you should be following:
This will start our storybook in a URL (something like http://localhost:53035/) where you can develop the component in isolation. Your changes will reflect in the story book.
npm run sync-files-to <path to your app>
onchange: watching ./src/**/*
. Make some change inside ./src
dir and save, it should trigger a re-build of arrow. You'll see a message onchange: command completed with code 0
and the built files will be copied to inside your app's node_modules dirUpdate @quintype/build
to v3.10.3 or higher. This is needed to process the css files exported by arrow.
Change @import "@quintype/arrow/dist/app.scss"
to @import "@quintype/arrow/app.scss"
in your app.scss file
Arrow v1 exports every component's CSS separately for better SSR performance
So suppose you were using Headline
and HeroImage
arrow components previously, you might be importing them like this:
import { Headline, HeroImage } from "@quintype/arrow";
import component styles like so:
// import "@quintype/arrow/<component name>/styles.arrow.css"
import { Headline, HeroImage } from "@quintype/arrow";
import "@quintype/arrow/Headline/styles.arrow.css";
import "@quintype/arrow/HeroImage/styles.arrow.css";
Arrow v2, has no breaking changes. It only updates the quintype-node-components
package version from v2.29.3 to v2.31.2.
In Arrow v3, we moved storybook to webpack5 and Updated @quintype/build
to v4.0.0
FAQs
Quintype's UI Component Library for Publisher Apps
We found that @quintype/arrow demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.