1.2.6 • Published 3 years ago

@dev-club/ds v1.2.6

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

@devClub/ds

Colman Dev Club Design System

NPM Package

Installation

npm install @dev-club/ds

Usage

// import a component
import { Example } from '@dev-club/ds';

function foo() {
    return (
        // use the imported component
        <Example />
    )
};

Components

You can see the components and test their different options using Storybook.

Button

Attributes:
AttributeTypeOptionsDefaultRequired
variantString"regular", "outlined", "text""regular"False
widthNumber-10False
heightNumber-3False
paddingNumber-0.2False
backgroundString-Theme.background.darkFalse
colorString-"none"False
onclickFunction--False
Example:
import { Button } from '@dev-club/ds';

function foo() {
    const log = () => {
        console.log('clicked!');
    };
    
    return (
        <Button variant="outlined" onclick={log}>
            Click Here!
        </Button>
    )
};

ButtonCTA

Attributes:
AttributeTypeOptionsDefaultRequired
sizeString"regular", "mobile""regular"False
Example:
import { ButtonCTA } from '@dev-club/ds';

function foo() {
    return (
        <Button size="mobile">
            Click Here!
        </Button>
    )
};

Droplist

Attributes:
AttributeTypeOptionsDefaultRequired
titleString--True
itemsArray--True
widthNumber-19.5False
heightNumber-2.3False
hoverString-Theme.background.yellowFalse
backgroundString-Theme.background.blueFalse
colorString-Theme.typography.whiteFalse
Example:
import { Droplist } from '@dev-club/ds';

function foo() {
    const arr = [
    { text: "1st option" },
    { 
    text: "2nd option",
      disabled: true,
    },
  ],
    return (
        <Droplist title="title" items={arr} />
    )
};

Typography

Attributes:
AttributeTypeOptionsDefaultRequired
variantString"p", "h1"-"h6"-True
colorString--True
weightNumber--False
sizeNumber--False
Example:
import { Typography, Theme } from '@dev-club/ds';

function foo() {
    return (
        <Typography variant="h1"  color={Theme.typography.dark}>
            Topography is the study of the land surface.
        <Typography />
    )
};

Navbar

Attributes:
AttributeTypeOptionsDefaultRequired
itemsArray--True
directionString"row", "column""row"False
gapNumber-1False
Example:
import { Navbar } from '@dev-club/ds';

function foo() {
    const arr = [
        {text: 'Home', url: 'https://www.npmjs.com/package/@dev-club/ds'},
        {text: 'About Us', url: 'https://www.npmjs.com/package/@dev-club/ds'}
    ];
    return (
        <Navbar items={arr} gap={2} />
    )
};

DropMenu

Attributes:
AttributeTypeOptionsDefaultRequired
titleString--True
itemsArray--True
widthNumber-15False
heightNumber-3False
hoverString-Theme.background.yellowFalse
backgroundString-Theme.background.darkFalse
colorString-Theme.typography.whiteFalse
Example:
import { DropMenu } from '@dev-club/ds';

function foo() {
    const arr = [
        {text: 'Home', url: 'https://www.npmjs.com/package/@dev-club/ds'},
        {text: 'About Us', url: 'https://www.npmjs.com/package/@dev-club/ds'}
    ];
    return (
        <DropMenu title="title" items={arr} />
    )
};

Disclosure

Attributes:
AttributeTypeOptionsDefaultRequired
disclosuresArray--True
widthNumber-30False
backgroundString-Theme.background.lightFalse
colorString-Theme.typography.whiteFalse
borderString-Theme.background.darkFalse
backgroundButtonStringTheme.background.yellowFalse
Example:
import { Disclosure } from '@dev-club/ds';

function foo() {
    const arr = [
        {
            text: "What is your refund policy?",
            content: "If you're unhappy with your purchase for any reason, email uswithin 90 days and we'll refund you in full, no questions asked."
        },
        {
            text: "What is your refund policy?",
            content: "If you're unhappy with your purchase for any reason, email uswithin 90 days and we'll refund you in full, no questions asked."
        }
    ];
    return (
        <Disclosure disclosures={arr} />
    )
};

Card

Attributes:

AttributeTypeOptionsDefaultRequired
widthNumber-12.222False
heightNumber-14.222False
colorString-Theme.background.yellowFalse
borderString-Theme.background.lightFalse
Example:
import { Card } from "@dev-club/ds";

function foo() {
   return (
      <Card width={12.222} height={14.222} color="#000000" border="#FFFFFF">
        <Typography variant="h1"  color="black">
            Topography is the study of the land surface
        <Typography />
      </Card>
   );
}

Tabs

Attributes:

AttributeTypeOptionsDefaultRequired
tabsArray--True
widthNumber--True
heightNumber--True
backgroundString-Theme.background.lightFalse
selectedbackgroundString-Theme.background.yellowFalse
borderString-"none"False
color (font)String-Theme.typography.whiteFalse
selectedcolor (font)String-Theme.typograpghy.darkFalse
gapNumber-1(rem)False
directionString"row", "column""row"False
spaceBooleantrue, falsetrueFalse
fontsizeNumber-1 (rem)False
Example:
import { Tabs, ButtonCTA } from "@dev-club/ds";
    
function foo() {
    const arr = [
        {text: 'Tab 1', content: 'content 1'},
        {text: 'Tab 2', content: <ButtonCTA text="Click Here"/>}
    ];
    return (
        <Tabs tabs={arr} width={10} height={6} />
   );
}

Theme

Options:
Background
  • #040413 Theme.background.dark - #040413
  • #0A0A1B Theme.background.light - #0A0A1B
  • #121231 Theme.background.blue - #121231
  • #F6C927 Theme.background.yellow - #F6C927
Typography
  • #FFFFFF Theme.typography.white - #FFFFFF
  • #F6C927 Theme.typography.yellow - #F6C927
  • #0A0A1B Theme.typography.dark - #0A0A1B
  • #0E0E28 Theme.typography.darker - #0E0E28
Border
  • #1F1F53 Theme.border.blue - #1F1F53
Example:
import { Theme, Typography } from '@dev-club/ds';

function foo() {
    return (
        <Typography variant="h1"  color={Theme.typography.dark}>
            Topography is the study of the land surface.
        <Typography />
};

GlobalStyles

This component includes CSS that should be used inside App.css.


License

MIT