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

@educabot/styles

v0.5.7

Published

<p align="center"> <img style="border-radius:8px" width="200" src="https://pbs.twimg.com/ext_tw_video_thumb/1299738248999309312/pu/img/f103bAbHeEFHhJLO.jpg:large" /> </p>

Downloads

234

Readme

Educabot styles library

The Educabot Styles Library is a utility library designed to streamline and standardize the management of styles in all applications across the Educabot organization. This library allows you to create consistent and maintainable styles while ensuring a unified theme is applied globally.

✨ Features

  • Same Language: All team developers understand and follow the same rules and methodologies.
  • Enhanced Developer Experience (DX): Fully typed and easy to learn.
  • Global Theming: Easily set and manage a global theme for your applications.
  • Reusable Styles: Define and reuse styles consistently across educabot projects.
  • JS in CSS: Write your styles using TypeScript, following the same pattern in all applications.

📦 Installation

npm install @educabot/styles

Usage

  • Setting Up the Global Theme In your application's entry point, set up the global theme using ThemeProvider provided:
import { ThemeProvider, defaultTheme } from '@educabot/styles'

ReactDOM.render(
  <ThemeProvider theme={createTheme(defaultTheme)}>
    <App />
  </ThemeProvider>,
  document.getElementById('root')
)
  • Stylized componente using makeStyles function. In your components, you can use the makeStyles function to define and apply styles based on the global theme:
import { makeStyles } from '@educabot/styles'

const useStyles = makeStyles((theme) => ({
  button: {
    border: 0
    padding: theme.spacing(2, 2, 4, 4),
    background: theme.palette.primary.main,
  },
}))

const Button = () => {
  const styles = useStyles()
  return <button className={styles.button}>Continue</button>
}
  • Stylized componente using useTheme hook.
import { useTheme } from '@educabot/styles'

const Text = () => {
  const theme = useTheme()
  return <span style={{ color: theme.palette.primary.main }}>Yay!</span>
}
  • Combine multiple styles.
import { cx, makeStyles } from '@educabot/styles'

const useStyles = makeStyles((theme) => ({
  text: {
    color: theme.palette.primary.main,
  },
  textBorder: {
    color: theme.palette.secondary.main,
  },
}))

const Text = () => {
  const styles = useStyles()
  const [selected, setSelected] = useState(false)
  return <span className={cx(styles.text, styles.textBorder)}>Yay!</span>
}
  • Use Fonts and CSS Typography. Include fonts in the project
import '@educabot/styles/dist/styles/fonts.css'