Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@achmadk/react-epic-spinner-css
Advanced tools
Readme
This library represents the React adaptation of EpicMax's Vue epic-spinners
Compared to react-epic-spinners
, this library offers several advantages for professional use:
styled-components
dependency, which can potentially cause issues in your web application due to multiple versions of styled-components
.postcss
and purgecss
.Using NPM
npm install @achmadk/react-epic-spinner-css
Or Yarn
yarn add @achmadk/react-epic-spinner-css
0.0.3
to 1.0.0
react
to version 17.0.0, which incorporates support for hooks and allows importing from react/jsx-runtime
- import from '@achmadk/react-epic-spinner-css/dist/react-epic-spinner-css.css'
+ import from '@achmadk/react-epic-spinner-css/dist/style.css'
An online demo is available here
import react-epic-spinner-css.css
first
import '@achmadk/react-epic-spinner-css/dist/style.css'
All components inherit properties from the <div>
element, such as style
, className
, onClick
, and so on. There are optional props provided to customize ones:
size
[number]
: Determines the rendering size of the spinner.color
[string]
: defaults to #fff
. Defines the spinner's color.animationDelay
[number]
: Indicates the spinner animation's duration. Lower values result in quicker animation restarts.import { AtomSpinner } from '@achmadk/react-epic-spinner-css'
// In your render function or SFC return
<AtomSpinner color="red">
All components are named exports of the package.
import { ... } from '@achmadk/react-epic-spinner-css'
@fullhuman/postcss-purgecss
and postcss
yarn add -D @fullhuman/postcss-purgecss postcss
postcss.config.js
into your app root projectconst purgecss = require('@fullhuman/postcss-purgecss')
module.exports = {
plugins: [
// only optimize CSS when process.env.NODE_ENV is production
...(process.env.NODE_ENV === 'production' ? [purgecss({
content: [
'./**/*.js',
'./**/*.jsx',
// if you are using TypeScript, please add this.
'./**/*.ts',
'./**/*.tsx'
],
// include `@achmadk/react-epic-spinner-css` css file to be processed.
css: ['./node_modules/@achmadk/react-epic-spinner-css/dist/*.css'],
// remove unused CSS keyframe definitions
keyframes: true,
safelist: {
greedy: [
// if you are using AtomSpinner, you can add /^atom-spinner/ .
// in this case, i am using SpringSpinner component
/^spring-spinner/
]
}
})] : [])
]
}
Because of some bugs with flexbox
on Firefox, the following components may not render properly
If you know a fix for it, please send a PR :)
[x] Storybook (WIP)
[ ] unit testing with jest
and @testing-library/*
MIT.
FAQs
Reusable react implementation of epic-spinners
The npm package @achmadk/react-epic-spinner-css receives a total of 4 weekly downloads. As such, @achmadk/react-epic-spinner-css popularity was classified as not popular.
We found that @achmadk/react-epic-spinner-css demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.