3.1.1 • Published 2 years ago

@doruk/components v3.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago
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

3.1.1

2 years ago

3.1.0

2 years ago

3.0.0

4 years ago

2.0.0

5 years ago

1.7.0

6 years ago

1.6.3

6 years ago

1.6.2

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago