npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

azachii-ui-react

v1.0.49

Published

Componentes de React diseñados por Azachii, agiliza el desarrollo de tu aplicación web usando nuestros componentes, personalizalos hasta convertirlos en tuyos

Downloads

57

Readme

azachii-ui-react

Componentes de React diseñados por Azachii, agiliza el desarrollo de tu aplicación web usando nuestros componentes, personalizalos hasta convertirlos en tuyos.

NPM JavaScript Style Guide

Instalación


npm install --save azachii-ui-react

Uso


AzachiiProvider


Se recomienda envolver tu aplicación en un AzachiiProvider para obtener acceso a:

  • dark: Indica si el modo obscuro esta habilitado.
  • toggleDark: Cambia el modo claro <--> obscuro.

Y para configurar algunos aspectos de los componentes:

  • allowDark: Habiliita el cambio entre modo claro y modo obscuro.
  • linkComponent: El componente que se usará por defecto para nanegar entre páginas.
  • framework: A veces es necesario definir el framework con el que funcionara la librería.
    • nextjs
  • theme: Configura los colores de los componentes
    • accentColor: Fondo de acento en tema claro.
    • accentColorText: Color de acento del texto en tema claro.
    • accentDarkColor: Fondo de acento en tema obscuro.
    • accentDarkColorText: Color de acento del texto en tema obscuro.

También es necesario que importes la hoja de estilos explicitamente.

import React from 'react'
import { AzachiiProvider } from 'azachii-ui-react'
import 'azachii-ui-react/dist/style.css'
import { Link } from 'gatsby'
import MainApp from './App'

const App = () => (
  <AzachiiProvider
    allowDark // Default: false
    theme={{
      accentColor: '#3a4da7', // Default: #ffffff
      accentColorText: '#fff', // Default: #181818
      accentDarkColor: '#b71c1c', // Default: #181818
      accentDarkColorText: '#fff' // Default: #fff
    }}
    linkComponent={Link} // Default <a>
    framework={undefined}
  >
    <MainApp />
  </AzachiiProvider>
)

ReactDOM.render(<App />, document.getElementById('root'))

AzachiiContext


Retorna los valores antes mencionados en el AzachiiProvider:

  • dark -> Default: false
  • toggleDark
  • theme -> Default: {}
import React, { useContext } from 'react'
import { AzachiiContext } from 'azachii-ui-react'

const HomePage = () => {
  const {
    toggleDark,
    dark,
    accentColor,
    accentColorText,
    accentDarkColor,
    accentDarkColorText
  } = useContext(AzachiiContext)

  return (
    <button
      type='button'
      onClick={toggleDark}
      style={{
        backgroundColor: dark ? accentDarkColor : accentDarkColorText,
        color: dark ? accentDarkColorText : accentColorText
      }}
    >
      {`${dark ? 'Desactivar' : 'Activar'} modo obscuro`}
    </button>
  )
}

Componentes


Footer


Un Footer minimalista, personalizalo agregando el nombre de tu sitio, sus multiples secciones y tus redes sociales.

Props:

  • withDivider -> Agrega una línea horizontal previa al contenido. Default: false
  • sections -> Un Arreglo de objetos con las siguientes claves:
    • title: Nombre de la sección
    • href: url
    • items: Arreglo de objetos con las siguientes claves:
      • title: Nombre de la sección
      • href: url
  • brand -> Cadena de texto u objeto que contenga lo siguiente:
    • name
    • longName
  • social -> Un objeto que acepta las siguientes claves:
    • facebook
    • instagram
    • twitter
    • linkedin
    • github
import React from 'react'
import { Footer } from 'azachii-ui-react'

const Layout = () => (
  <>
    <Footer
      withDivider // Default: false
      sections={[
        {
          title: 'Acerca de',
          href: '/'
        },
        {
          title: 'Servicios',
          href: '/servicios',
          items: [
            {
              title: 'Desarrollo',
              href: '/desarrollo'
            }
          ]
        }
      ]}
      brand={{ // O únicamente brand='Azachii'
        name: 'Azachii',
        longName: 'Azachii Develop'
      }}
      social={{
          facebook: 'https://www.facebook.com/az4chii-100360501432809/',
          instagram: 'https://www.instagram.com/az4chii/',
          twitter: 'https://twitter.com/Azachii1',
          linkedin: 'https://www.linkedin.com/company/38087888',
          github: 'https://github.com/Azachii'
        }}
    >
  </>
)

export default Layout

Header


Un Header minimalista, personalizalo agregando el nombre de tu sitio, sus multiples secciones. Incluye un Sidebar y un Switch para cambiar entre el modo obscuro y el modo claro (En el caso de que este activado el cambio). Tambíenn puedes usar tu Sidebar personalizado.

Props:

  • transparent -> Remueve el fondo del Header, en el caso de que la posición del header sea fija, el fondo reaparecera cuando hayas hecho scroll. Default: false
  • withElevation -> Agrega una sombra en la parte de abajo, en el caso de que la posiciín del header sea fija, aparecera automaticamente cuando hayas hecho scroll. Default: false
  • position -> La posición del header. Default: relative
  • title -> El nombre de tu sitio
  • items -> Las secciónes que apareceran en el header, acepta subitems para aparecer en un dropdown. Default: []
    • label -> Nombre de la sección
    • href -> Url de la sección
    • items -> Subitems
      • label-> Nombre de la subsección
      • href -> Url de la subsección
  • sidebar: Un objecto con las configuraciónes del sidebar o un componente de React que será utiliizado como Sidebar.
    • social -> Un objeto que acepta las siguientes claves:
      • facebook
      • instagram
      • twitter
      • linkedin
      • github
    • extraItems: Por defecto, agrega las secciones del header al sidebar, si necesitas agregar algo más, aquí es donde debes colocarlo. Es un arreglo de objetos
      • label -> Nombre de la sección
      • href -> Url de la sección
      • items -> Subitems
        • label-> Nombre de la subsección
        • href -> Url de la subsección
import React from 'react'
import { Header } from 'azachii-ui-react'

const Layout = () => (
  <>
    <Header
      transparent // Default: false
      withElevation={false} // Default: false
      position='fixed' // Default: relative
      title='Azachii'
      items={[
          {
            title: 'Servicios',
            href: '/servicios',
          },
          {
            title: 'Equipo',
            href: '/equipo',
          },
          {
            title: 'Blog',
            href: '/blog',
          },
          {
            title: 'Términos y Condiciones',
            href: '/',
          },
        ]}
        sidebar={{ // O sidebar={({ isOpen, headerItems }) => <MySidebar open={isOpen} items={headerItems} />}
          social: {
            facebook: 'https://www.facebook.com/az4chii-100360501432809/',
            instagram: 'https://www.instagram.com/az4chii/',
            twitter: 'https://twitter.com/Azachii1',
            linkedin: 'https://www.linkedin.com/company/38087888',
            github: 'https://github.com/Azachii',
          },
          extraItems: [
            {
              label: 'Azachii',
              href: 'https://azachii.digital'
            }
          ]
        }}
    >
  </>
)

Otros Componentes


  • Banner
  • Button
  • DarkToggle
  • SocialIcons
  • Sidebar
  • Project
  • Card
  • Field
  • Button
  • Section

Licencia

MIT © Azachii