New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@doruk/components

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@doruk/components

:sun_with_face:

3.1.1
latest
Version published
Weekly downloads
76
7500%
Maintainers
1
Weekly downloads
 
Created
import { Button, Loader } from "@doruk/components"

const aButton = () => (
  <Button accent="success">
    Hello world!
  </Button>
);

const aLoader = () => (
  <Loader size="md" fill="rebeccapurple" />
);

const overlayedLoader = () => (
  React.createPortal(
    <Loader
      variant="rect5"
      fullscreen={{
        bg: { color: "rgba(0,0,0,.5)", tint: 9 }
      }}
    />,
    document.getElementById("loader")
  )
);

const yetAnotherLoader = () => (
  <Loader
    size="xs"
    fullscreen="rgba(0,0,0,.6)"
  />
);

Button

proptypedescriptiondefault
accentstringone of; primary, secondary, success, error, warningprimary

Loader

proptypedescriptiondefault
fullscreenstring|{color,tint}overlay loader over <body>{color:"mistyrose",tint:3}
fillstringfill of the SVG elements-
strokestringstroke of the SVG elements-
sizestringone of; xs, sm, md, lg, xlsm
variantstringone of: spin1, spin2, spin3, rect1, rect2, rect3, rect4, rect5spin1

rest

Ul Li Main P Span Nav Div Section H1 H2 H3 H4 H5 H6 A Article Aside Audio B Br Caption Code Footer Header Hr I Iframe Img Input Li Main Ol Option P Picture Pre Progress Select Source Table Tbody Td Textarea Tfoot Th Thead Tr U Ul Video

CSS reset & normalize

import { Normalize, Reset, Main } from "@doruk/components"

const App = () => (
  <Main>
    <Reset />
    <Normalize />
  </Main>
);

or

import { normalize, reset, Section } from "@doruk/components"

const GlobalStyle = styled.createGlobalStyle`
  ${reset}
  ${normalize}
`;

const App = () => (
  <Section>
    <GlobalStyle />
  </Section>
);

Load from CDN

<script src="https://unpkg.com/@doruk/components"></script>

Then the library is available as _components; i.e. window._components.Button

FAQs

Package last updated on 07 Jan 2022

Did you know?

Socket

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.

Install

Related posts